Dynamically set li3 environment based on subdomain
Today I needed to dynamically set the Environment based on the HTTP_HOST, specifically, development environment when a particular subdomain was used.
By default, the lithium detector will only set the environment to development if the request is coming from 127.0.0.1.
A quick and easy way to get around this, is to modify /config/bootstrap/action.php to check the HTTP_HOST and set the environment if a conditional is fulfilled.
There’s probably a better way to do this, by setting an Apache env variable and checking that, but this was a quick and dirty hack that did the trick.