save address, delete cart item some ajax based function suddenly have CSRF (419 error) on hosting
-
Dear Bagisto team,
Suddenly some of ajax-based functions like save addresses, delete cart items become errors on hosting..
on local it's working fine..when upload to hosting it has this 419 CSRF error..Please Advice..
-
@otheriz
you may check the cause and find solution here
https://stackoverflow.com/questions/52764590/laravel-419-error-verifycsrftoken-issue -
@Vaishali-Agarwal thank you,
somehow,
Found some solution after many hours of trying, maybe someone has this problem someday..it has this error if using "http://" but when i change to "https://" it's worked...don't know why...
i don't use the "https://" link before because :- it's development link "dev.domain.com"
- my subdomain doesn't have SSL certificate installed..
but, even it does not have SSL, i don't know why it needs an "https://" link to get worked...
-
@otheriz
It only works on HTTPS as might you have allow cookies to https.
for more information please check https://github.com/laravel/framework/issues/26106 -
@Vaishali-Agarwal I also encounter the same issue. save address, delete cart not working.I have changed SESSION_SECURE_COOKIE to false and tried out. I tried in incognito also. Please help me with this.
-
@gowtham135
try to flush the project's cache by executing command
php artisan config:cache