ci_session cookie rejection warning |
Hi!
I have noticed Firefox giving the following warning in the console: Cookie “ci_session” will be soon rejected because it has the “sameSite” attribute set to “none” or an invalid value, without the “secure” attribute. To know more about the “sameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Cookies Anything I can fix as a user?
I am also getting warning in firefox console that
"Cookie “ci_session” will be soon rejected because it has the “sameSite” attribute set to “none” or an invalid value, without the “secure” attribute. To know more about the “sameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Cookies". My javascript has been stopped working now from when I am getting this notice.
In the file app/Config/App.php you will need to use
PHP Code: public $cookieSecure = true; And you will also need to implement SSL certificates and use https
Also make sure that this has not been changed in Config/app.php
PHP Code: public $cookieSameSite = 'Lax'; What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Hi I know this is the Codeigniter 4 forum, but I am maintaining a legacy CI3 system and wondered anybody here knows if there is a solution to the Firefox cookie rejection message for CI3. Thanks.
For CI 3 no there is not a solution at this time.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Hi,
Use at your own risk system\libraries\Session\Session.php line ~159 Code: // Another work-around ... PHP doesn't seem to send the session cookie Code: isset($params['cookie_path']) OR $params['cookie_path'] = config_item('cookie_path'); application\config\config.php line ~403 Code: $config['cookie_prefix'] = ''; |
Welcome Guest, Not a member yet? Register Sign In |