Detecting HTTPS using x-https

You can use x headers to detect if the URL is using HTTP or HTTPS, you will find the header x-https only exists in the GetHttpRequestData() method when using HTTPS. Below is a simple IF statement to detect this:

<cfif StructKeyExists(GetHttpRequestData().headers, 'x-https')>

Seeing all x headers:

You can use the following code to dump call request headers that tomcat proxy will detect:


  • Lucee, HTTPS, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Just installed Railo but SES URL's not working

To fix this issue please see the below article by Kevan Stannard Codex uses URLs that have the...

CFML Compatibility

Railo tries to adhere the CFML standard as good as possible, Still there are some differences...


Here's a list of the most important CFML frameworks that have been tested successfully with Railo...


We have tested several applications for the functionality with Lucee. Here's a list of the most...

Lucee Linux file permissions

Linux requires extra commands for handling files with Lucee: cffile mode=""When working with...