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: https://www.mywebsite.com/cart/Purchase-Summary-Checkout.html,
which is routed to
the cart.index event handler.
When the form is submitted, the request is getting redirected to
http://www.mywebsite.com/cart/index.
Here's what I've tried to do inside Routes.cfm:
<cfscript>
  // General Properties
  setEnabled(true);
  setUniqueURLS(true);
  setExtensionDetection( false );
  setAutoReload(true);
    protocol = "http";
    if ( not compareNoCase(cgi.https,"on") ) {
      protocol = "https";
    }

  // Base URL
  if( len(getSetting('AppMapping') ) lte 1){
    setBaseURL("#protocol#://#cgi.server_name#/");
  }
  else{
    setBaseURL("#protocol#://#cgi.server_name#/
#getSetting('AppMapping')#/");
  }

  // Your Application Routes
  addRoute("content/:file","content","index");//for rendering 'static'
content pages
  addRoute("draft-complaint/:searchType/:file","complaint","index");
  addRoute("draft-discovery-
requests/:searchType/:file","discovery","index");
  addRoute("forms/:incForm/:file","content","index");
  addRoute("cart/remove/:file","cart","remove");
  addRoute("cart/showCart","cart","showCart");
  addRoute("cart/submitOrder/:file","cart","submitOrder");
  addRoute("cart/:file","cart","index");
  addRoute("complaint/
categorySearch/:id/:file","complaint","categorySearch");
  addRoute("discovery/
categorySearch/:id/:file","discovery","categorySearch");
  addRoute("printHandler/:file","content","print");//for printable
documents
  addRoute("downloadHandler/","download","index");
  addRoute(":handler/:action?");
</cfscript>

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

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