【发布时间】:2019-10-14 19:19:33
【问题描述】:
从 Laravel 5.5 开始升级到 5.8(当前版本 5.8.11)。问题是,当我在本地测试一切正常时,当我将项目上传到我的主机(专用服务器/共享主机都尝试过)时,我的 419 页面已过期,但这并不是登录所独有的,所有表单都受到影响并且给 419 页面过期。
5.5 -> 5.6
update dependency: "fideloper/proxy": "^4.0", updated all other dependencies to latest versions
update php unit: 7
removed php artisan optimize from composer.json
5.6 -> 5.6.30 没有变化
5.6 -> 5.7 在 composer.json 中将 laravel/framework 依赖更新为 5.7 更改资产目录
From resources/assets/js/* to resources/js/*
From resources/assets/sass/* to resources/sass/*
更新 mix.js
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
5.7 -> 5.8 在 composer.json 中更新 laravel/framework 依赖到 5.8
创建了全新的 5.8 安装并将文件移动到其中,目前仅移动我为创建(制作 2 个版本 5.5 和 5.8)而编辑的文件,但这需要一些时间。
生成的新应用密钥(无变化) 将默认会话域设置为我的域(无更改) 在 Firefox 和 chrome + 隐身模式下测试,看看缓存会话是否有问题
运行以下命令:
composer dump-autolaod
php artisan cache:clear
php artisan config:cache
php artisan route:cache
所有表单都有 csrf_field(),也存在于 head 中
什么可能导致这个问题?
【问题讨论】: