In any events that need to be secure broadcast a message thats picked up by
a controller, have that check if the current sheme is https, and if not
have it redirect to itself on https
heres a really quick untested example
<event-handler name="page.secure">
<broadcasts>
<message name="checkSecure" />
</broadcasts>
...
</event-handler>
//controller.cfc
function checkSecure(event) {
if(!CGI.SERVER_PORT_SECURE) {
// the domain should probably come from a config bean or whatever
var myself = "https://mysite.com/"
& event.linkTo(event.getInitialEventHandlerName());
location(url=myself);
}
}
If you need to secure large numbers of events use an event-type for that
event-handlers blocks
Cheers, Chris
On 20 April 2012 18:08, HENRI Jeremie <[email protected]> wrote:
> Why not do that using a rewrite directive on apache. That would be easier
> to do.
> http://www.sslshopper.com/apache-redirect-http-to-https.html
> Hope that helps!
>
> Jeremie
>
> On Apr 21, 2012, at 2:05 AM, Clifford Moon <[email protected]>
> wrote:
>
> > Greetings,
> >
> > We are enforcing https for all login pages. What is the best method
> > for redirecting from http to https and where within the model glue
> > framework should this go?
> >
> >
> > Thanks for any help in advance,
> >
> > Cliff
> >
> > --
> > Model-Glue Sites:
> > Home Page: http://www.model-glue.com
> > Documentation: http://docs.model-glue.com
> > Bug Tracker: http://bugs.model-glue.com
> > Blog: http://www.model-glue.com/blog
> >
> > You received this message because you are subscribed to the Google
> > Groups "model-glue" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/model-glue?hl=en
>
> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en
>
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en