我[310] Too many redirects
在 heroku 上遇到错误,当我的蛋糕应用程序在使用SecurityComponent::requireSecure()
.
public function beforeFilter() {
$this->Security->blackHoleCallback = '_blackholeCallback';
$this->Security->requireSecure('login', 'register');
}
// ...
public function _blackholeCallback($type) {
if ($type == 'secure') {
$this->redirect('https://' . env('SERVER_NAME') . $this->here);
}
}