简体   繁体   中英

In CakePHP Auth - is there a way to force https on all actions requiring Authentication (but not others)

Using CakePHP Auth, I want to have all actions that require being logged in to also be forced to use https.

Is this possible 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.

版本2.x的新功能:SecurityComponent :: requireSecure()参见http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html

登录页面也必须通过HTTPS提供服务,并且您可能希望为登录用户提供secure会话cookie,因此在通过HTTP访问网站时不会传输该登录cookie(这意味着用户在浏览时不会显示为登录状态)通过HTTP)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM