Session not saving when moving from ssl to non-ssl

后端 未结 7 1049
我在风中等你
我在风中等你 2020-12-31 15:17

I have a login screen that I force to be ssl, so like this: https://www.foobar.com/login then after they login, they get moved to the homepage: https://www.foobar.com/dashba

7条回答
  •  有刺的猬
    2020-12-31 16:00

    You can specify your own session handling settings in a configuration file (rather than editing the CakePHP library file.) In the configuration file you can set session.cookie_secure to 0, which will take precedence over the setting in /cake/lib/session.php. This will allow the session cookie to be used for both SSL and non-SSL connections.

    Here is a blog entry on the topic: http://bakery.cakephp.org/articles/view/how-to-bend-cakephp-s-session-handling-to-your-needs

    and some documentation from the Cookbook: http://book.cakephp.org/view/173/Sessions

提交回复
热议问题