One of the first things I want to do, on each request, is to ensure that
each request/response is secured.  Therefore, if cgi.https is "off", I
will redirect the browser to the secured location.
 
My plan was to put this code in the pseudo-constructor area (not in any
particular function body):
 
<cfif len(trim(cgi.query_string)) gt 0>
    <cfset queryString="?#cgi.query_string#">
<cfelse>
    <cfset queryString="">
</cfif>
 
<cfif cgi.https is "off">
    <cflocation
url="https://#cgi.server_name##cgi.path_info##queryString#";
addtoken="no" statuscode="301">
</cfif>

The code works fine, but I'm wondering if it is the wrong place to put
this code.  Would it be more-semantic if it were located in the
onRequestStart function?
 
On this particular site, every page will need to be secured.
 
Michael Dawson
Manager of Web Applications
Office of Technology Services
University of Evansville
 
Each time you send an email message with a background pattern
or loud background color, an endangered tree dies.
Please help us save a tree. Just say "NO" to email backgrounds.
 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323576
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to