![](/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.