How to identify running in the AppHarbor environment?
I'm looking for a clean way for my app to distinguish when it is running in the AppHarbor environment vs local or a different staging environment. This would be handy both for pulling environment specific app settings from the config file and being able to rewrite URLs properly. From what I can tell the environment == release application setting is the only mechanism currently available.
Is there anything else that could be used to know when the app is running in AppHarbor beyond a shadow of a doubt? Maybe a HTTP header from Nginx when it forwards the request?
Thanks!
John
Discussions are closed to public comments.
If you need help with AppHarbor please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by tt on 17 Feb, 2011 04:04 AM
Besides injecting the environment into the
<appSettings/>
element, we recently added support for configuration transformations and we also support injecting the connection string. We don't expose any of this externally though, but you could easily add a custom header yourself, based on the value of the configuration element.tt closed this discussion on 17 Feb, 2011 04:04 AM.
rune re-opened this discussion on 17 Feb, 2011 04:19 AM
Support Staff 2 Posted by rune on 17 Feb, 2011 04:19 AM
The different environment-related features are also described in our knowledge base: http://support.appharbor.com/kb/getting-started/managing-environments
rune closed this discussion on 17 Feb, 2011 04:19 AM.