Open jonnor opened 9 years ago
Does not seem that Heroku sets an appropriate envvar. But incoming requests should in most cases the right value (and for the cases which is does not, use manual override)
We do this in imgflo (runtime): https://github.com/jonnor/imgflo/commit/f92446b9efa349c64a356a52ad4c5773070751c8
The local cache relies on HOSTNAME envvar to work correctly. This should be avoided to simplify config, perhaps by using an existing envvar set by Heroku or by headers/info on the incoming requests.