How reliable would this scenario be, then:

One application with one application.cfm. Three locations for the 
application: local development machine, public production server, 
private production server. Only some resources are available on 
each platform, need a way to determine which platform app is 
running on to disable attempting to access unavailable resources.

For example: 
Production machine - all resources available - NT authentication, 
access to resources off the box.
Private machine - NT authentication available, no access to 
resources off the box.
Local machine - W98, PWS - no NT authentication available

How to identify which location the app is running on within the 
same application.cfm and conditionally process accordingly?

Currently using check on CGI.HTTP_HOST for either 
localhost/127.0.0.1 or www.publicserver.com or IP address of 
private server. Is this unreliable for this? Is there a better way? 
This appears to be working but this thread has made me wonder.

Stephen


To this:
> > what about CGI.HTTP_HOST or CGI.SERVER_NAME?
Dave Watts replied:
> These are only as reliable as the information they're fed by the
> browser. For example, if I wanted, from my browser, to put a
> specific value in those variables, I can do that. I need only edit
> my hosts file to give whatever name I want to the appropriate IP
> address. The only way to know that the name used by the browser is
> the appropriate name is if you're using name-based virtual servers,
> which will only accept requests that provide the appropriate name.
> 
> Also, in a clustered environment, these variables may provide the
> external name used to reach the cluster, rather than a name
> corresponding to a specific server.
> 
> Dave Watts, CTO, Fig Leaf Software


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to