<cfif cgi.https IS "off">
nope
<cfelse>
yup
</cfif>

I know what you are saying about CGI variables, lots of talk about users being able to 
modify them, whether its true I don't know. I reckon there are some that can be 
modified like user agent etc. but about the rest I don't know, I would think cgi.https 
would be passed by the server and not the browser but I could be totally wrong.

-----Original Message-----
From: Ryan Sabir [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 April 2004 1:28 PM
To: CFAussie Mailing List
Subject: [cfaussie] Testing for HTTPS


Greetings peoples,

What is the best way to make sure that a user is accessing a certain
page using https instead of http?

At the moment I'm doing this:

<CFIF CGI.SERVER_PORT EQ 80>
  <CFSET currentPageIsSecure = false>
<CFELSE>
  <CFSET currentPageIsSecure = true>
</CFIF>

Which seems to work in testing, but I've been told not to rely on CGI
variables.

Is there a better way to do it?

thanks.

-----------------------
Ryan Sabir
Newgency Pty Ltd
2a Broughton St
Paddington 2021
Sydney, Australia
Ph (02) 9331 2133
Fax (02) 9331 5199
Mobile: 0411 512 454
http://www.newgency.com/index.cfm?referer=rysig 


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to