![](/img/trans.png)
[英]Force HTTPS on certain directories and force HTTP on all others using .htaccess
[英]In CakePHP Auth - is there a way to force https on all actions requiring Authentication (but not others)
使用CakePHP Auth,我希望所有需要登录的操作也被强制使用https。
是否可以通过回调进行某种方式?
进一步的信息:我正在使用管理员路由以及某些“仅会员”操作。 也使用CakePHP 1.2。
非常感谢您对此提出任何建议。
版本2.x的新功能:SecurityComponent :: requireSecure()参见http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html
登录页面也必须通过HTTPS提供服务,并且您可能希望为登录用户提供secure
会话cookie,因此在通过HTTP访问网站时不会传输该登录cookie(这意味着用户在浏览时不会显示为登录状态)通过HTTP)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.