Agreed. Using CGI.HOST_NAME for dev/test/live switching opens you up to all sorts of abuse.
Here's what I switch on: createObject( 'java', 'java.net.InetAddress' ).getLocalHost().getHostName() I have a configuration file that maps from all the known (partial) hostname matches to different tiers. This allows each developer to configure their environment how they want it (for example, enabling or disabling debugging) while still using a single codebase. It also makes it easy to configure our pre-production environment to use the same setup (for e-commerce) as our production environment, while our CI and dev/test envs all use sandbox credentials. This was, until recently, an environment control interceptor in ColdBox. We've just moved it to Clojure now so we can automatically configure all our Clojure / Scala / CFML code the same way... Sean On Thu, May 19, 2011 at 9:09 AM, Raymond Camden <rcam...@gmail.com> wrote: > What about an ecommerce system that hits the test ecom system when in > dev mode? If I knew your code did that, or suspected, I'd try it and > use one of the many common test CC numbers, like 4111111111111111. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344716 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm