SilverStripe SSL switching by statics


/ Published in: PHP
Save to your folder(s)

A little function I add to the base Page_Controller class that allows you to define what actions are explicitly SSL. It will put users in SSL when they access it and take them out of it when they navigate somewhere else. It is available in any controllers that extend Page_Controller.

Be sure to add `$this->_checkSSL();` to the Page_Controller's `init()` function.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.