SSL and ses url confusion

Hello everyone,
Forgive me if this has addressed before, but I have searched the
forums and haven't found an answer to my problem
I have a form on a non-ssl page that posts to an ssl enabled page.
When the form is submitted, CB is redirecting to a non-ssl version of
the page. My form data is lost during the re-direct. Here is the code
for building the link in the form:
#event.buildLink(linkto='cart', queryString='Purchase-Summary-
Checkout.html',SSL="true" ) )#
The link generated is:,
which is routed to
the cart.index event handler.
When the form is submitted, the request is getting redirected to
Here's what I've tried to do inside Routes.cfm:
  // General Properties
  setExtensionDetection( false );
    protocol = "http";
    if ( not compareNoCase(cgi.https,"on") ) {
      protocol = "https";

  // Base URL
  if( len(getSetting('AppMapping') ) lte 1){

  // Your Application Routes
  addRoute("content/:file","content","index");//for rendering 'static'
content pages
  addRoute("printHandler/:file","content","print");//for printable

I forgot to mention I am using ColdBox 3.0.0 RC1 for this

Are you using Apache or IIS as they report cgi.https differently?