简体   繁体   中英

Facing 419 | Page Expired even if CSRF present in the form

  • Laravel Version: 8.35.0
  • PHP Version: 7.4.0
  • Database Driver & Version:

Description:

Facing a CSRF issue when I deployed my project on a VPS server. Here is the video: https://www.loom.com/share/e2cd2c7ae2f6490ab1717d3243592513

Here is my form![图片](https://user-images.githubusercontent.com/43857625/113865389-d7d3bd80-97cd-11eb-83f5-db427a826598.png)

I have no idea why I am facing this.

Here is my application: https://tukhulu.com/login https://tukhulu.com/register

Please help

Steps To Reproduce:

Try to clear all cache items

php artisan view:clear 
php artisan route:clear
php artisan cache:clear
php artisan config:cache

try changed the session_driver

if your project is running on server add SESSION_DOMAIN=yourdomain.com in your.env file or in your config/session.php 'domain' => env('SESSION_DOMAIN', 'yourdomain.com'), then run

php artisan cache:clear

maybe switch between 'secure' => env('SESSION_SECURE_COOKIE', false), and 'secure' => env('SESSION_SECURE_COOKIE', true), in your config/session.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM