I have applications that make CORS calls to each other. Google in April 2020 will need SameSite cookies = none. https://www.chromestatus.com/feature/5633521622188032
Since chrome version 80+ all user that use chrome browser impact this csrf error. how to fix this problem on Codeigniter framework that using PHP 7.3
4
Answers
Problem is solved
1.ADD this config at application/config/config.php for all cookie in framework
2.Edit this line at system/core/Security.php line ~273 replace from
to
for csrf support SameSite attribute.
I had this same problem but my PHP 7.2 and my CI 3.X.
The problem was solved by making the following change to the applications / config / config.php file
There is an official issue on CI for this issue, check this :
https://github.com/bcit-ci/CodeIgniter/issues/5791
Note that this fix needs PHP 7.3
Never modify the files in the SYSTEM directory, because you may have problems updating the codeigniter. It is better that, in
APPLICATION/CORE
, you create a file calledMY_Security.php
and extend the Security controller.Example: