“Laravel 8页面过期 419 在POST请求时移动到新域名时”

huangapple go评论46阅读模式
英文:

Laravel 8 page expired 419 on post request when move to new domain

问题

我将项目移至同一服务器的另一个域目录
只清除缓存,路由,视图,配置
然后更新composer并生成新密钥
但在任何提交请求中都给我(419页过期)
以及Ajax请求中的CSRF令牌不匹配
域DNS来自Cloudflare

英文:

I move the project to another domain directory in the same server
i just clear cache, routes, views, config
then update the composer and generate new keys
but it gives me (419 page expired) in any post request
and CSRF token mismatch in Ajax request
domain DNS from cloudflare

答案1

得分: 1

我找到了解决我的问题的方法。
在config/session.php文件中的域值与旧域名相关。
我更改为新域名,问题得以解决。

英文:

i found solution for my problem
the domain value in the config/session.php file is related to the old domain
i change to new domain and this solve the problem

huangapple
  • 本文由 发表于 2023年5月7日 19:57:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76193782.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定