Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

How to identify running in the AppHarbor environment?

johnclayton's Avatar

johnclayton

17 Feb, 2011 03:54 AM

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

  1. Support Staff 1 Posted by tt on 17 Feb, 2011 04:04 AM

    tt's Avatar

    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.

  2. tt closed this discussion on 17 Feb, 2011 04:04 AM.

  3. rune re-opened this discussion on 17 Feb, 2011 04:19 AM

  4. Support Staff 2 Posted by rune on 17 Feb, 2011 04:19 AM

    rune's Avatar

    The different environment-related features are also described in our knowledge base: http://support.appharbor.com/kb/getting-started/managing-environments

  5. rune closed this discussion on 17 Feb, 2011 04:19 AM.

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