I have been trying to implement either Tawk.to or Odoo chat to my Codeigniter-based website. So far, it doesn't work. As I used inspect on the page, I saw some warnings about "SameSite" cookies.
Is there a way to deal with this?
My website is using CI 3 and PHP 7.3, so the method to change it in the config is not working for me. It even blocked my normal session data.
I've tried the following change in the applications / config / config.php file, but it doesn't work. It even blocked my default session data.
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/; SameSite=None';
$config['cookie_secure'] = TRUE;
$config['cookie_httponly'] = FALSE;
Another thing I tried is the following.
- A change in the application/config/config.php
ini_set('session.cookie_samesite', 'None');
ini_set('session.cookie_secure', TRUE);
- A change in the system/core/Security.php
setcookie(
$this->_csrf_cookie_name,
$this->_csrf_hash,
['samesite' => 'None',
'secure' => true,
'expires' => $expire,
'path' => config_item('cookie_path'),
'domain' => config_item('cookie_domain'),
'httponly' => config_item('cookie_httponly')]);
The results are the same. I still got the same warning that the cookies are not set to 'Secure' and thus both widget doesn't appear on the page. The warning I mentioned is the one in the 'Issue' tab when I open the "Inspect Page" of the website using Chrome. I tried using Firefox but it is the same too.
question from:
https://stackoverflow.com/questions/66062719/how-to-attach-tawk-to-or-odoo-chat-to-codeigniter-site-is-the-problem-with-same 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…