I have a signup process which is done through HTTPS. The last page of the process does not require the request to be SSL enabled so I am wondering how I would achieve redirecting from an HTTPS page.
My code looks like this: setNextEvent(event=‘verify/contact/success’,persist=‘pagetitle,firstname,lastname,username,contact,user’);
verify/contact/success is defined as a route. I know there is a new setting in routes to force a route to be SSL, but what about the other way around?
In my ColdBox Config, I create a setting of “allowed SSL event.actions” and I have an interceptor that, if the request is SSL, checks to see if the target action is allowd to be SSL using Event.getCurrentEvent() (pretty sure thats the all).
// Example ColdBox.cfc
settings = {
allowedSSLRegEx = “^login|^cart”;
}
// Interceptor
if (reFindNoCase(getSetting(“allowedSSLRegEx”),Event.getCurrentEvent()) == 0) {
// redirect to non-ssl
}
That makes sense, however i’m confused how to do the redirection using setNextEvent() forcing it to go to non HTTPS. By default setNextEvent redirects to whatever the current request is set to. In this case HTTPS.