Using CakePHP Auth, I want to have all actions that require being logged in to also be forced to use https.
Is this possibl开发者_运维问答e via a callback somehow?
Further info: I have admin routing in use as well as certain "member-only" actions. Using CakePHP 1.2 also.
Many thanks for any pointers on this.
New for version 2.x: SecurityComponent::requireSecure() see http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html
The login page must also be served over HTTPS, and you probably want a secure
session cookie for logged in users, so it isn't transmitted when accessing the site over HTTP (this means that the user won't appear as logged in when browsing over HTTP).
精彩评论