If you ever need to force certain controllers to use SSL in Kohana, it’s actually quite easy:
In Kohana’s controller class (/system/classes/controller.php) add a variable and before function like this:
public $require_ssl = FALSE; public function before() { parent::before(); if ($this->force_ssl && Request::$protocol == 'http') { Request::Instance()->redirect(URL::site(Request::Instance()->uri, 'https')); } }
And then set “force_ssl” to be true at the top of each controller that you want SSL to be required for:
Class Controller_mycontrollername extends Controller_Template { public $force_ssl = TRUE;