class WidgetController extends AppController { public $components = array('Security'); public function beforeFilter() { $this->Security->blackHoleCallback = 'forceSSL'; $this->Security->requireSecure(); } public function forceSSL() { $this->redirect('https://' . env('SERVER_NAME') . $this->here); } }引用元はここ