Chrome 隐身模式下的 Laravel 419 问题

问题描述 投票:0回答:1

我使用 Laravel 5.8 版本。 我的表格是:

<form method="POST" action="store_catalog" accept-charset="UTF-8" enctype="multipart/form-data">
  
  {{ csrf_field() }}

当我提交表单时,出现 419 错误,但发送了 _token: enter image description here

所有这些在标准 Chrome 模式下都可以完美工作,但在隐身模式下则不起作用。我还认为这在其他一些浏览器中不起作用,但我没有检查。

为什么我在隐身模式下收到 419 错误以及如何解决?

laravel post csrf laravel-5.8 incognito-mode
1个回答
0
投票

只需按照以下步骤操作:

  1. 转到 Chrome 中的“设置”页面
  2. 隐私和安全
  3. 第三方 cookie 部分
  4. 禁用“在隐身模式下阻止第三方 cookie”选项
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.