Force specific actions to use SSL
Force specific actions to use SSL
<?php class AppController extends Controller { var $components = array('Security'); function beforeFilter() { $this->Security->blackHoleCallback = 'forceSSL'; $this->Security->requireSecure('login', 'checkout'); } function forceSSL() { $this->redirect('https://' . $_SERVER['SERVER_NAME'] . $this->here); } } ?>