laravel 请求出现 post The page has expired due to inactivity.
使用Laravel提交POST请求出现:The page has expired due to inactivity. Please refresh and try again.
这是由于在Laravel框架中有此要求:
任何指向 web 中 POST, PUT 或 DELETE 路由的 HTML 表单请求都应该包含一个 CSRF 令牌(CSRF token),否则,这个请求将会被拒绝。
所以要么你在加上csrf,如果是在linux上通过命令行访问接口,比如:
curl -X POST http://192.168.150.144/sendmsg
get方式没事,但post就不行了,要想使用post方式,可以在指定页面添加路有名来移除CSRF保护: /app/Http/Middleware/VerifyCsrfToken.php
protected $except = ["sendmsg" // "*"];
参考:Link
laravel 请求出现 post The page has expired due to inactivity.相关推荐
- 使用Laravel提交POST请求出现The page has expired due to inactivity错误
使用Laravel提交POST请求出现The page has expired due to inactivity. Please refresh and try again. 问题: 提交POST请 ...
- Laravel框架post的路由出现The page has expired due to inactivity. Please refresh and try again.
post提交数据时候显示如下: The page has expired due to inactivity. Please refresh and try again 这是由于在laravel框架中 ...
- 使用Larave5.6l提交POST请求出现The page has expired due to inactivity错误
使用Larave5.6l提交POST请求出现The page has expired due to inactivity错误 使用Larave5.6l提交POST请求出现The page has ex ...
- laravel5.6 提示The page has expired due to inactivity. Please refresh and try again.的解决方法
post提交数据时候显示如下: The page has expired due to inactivity. Please refresh and try again 这是由于在laravel框架中 ...
- The page has expired due to inactivity Please refresh and try again
post提交数据时候显示如下: The page has expired due to inactivity. Please refresh and try again123 这是由于在laravel ...
- The page has expired due to inactivity. Please refresh and try again.
The page has expired due to inactivity. Please refresh and try again. laravel5.6 开发API使用apipost调用路由时 ...
- laravel5.5 The page has expired due to inactivity. Please refresh and try again.
报错: The page has expired due to inactivity. Please refresh and try again. 原因: 表单未添加CSRF验证,应添加{{ csrf ...
- laravel常见错误(一):The page has expired due to inactivity. Please refresh and try again.
背景知识: 最近工作上使用了laravel框架,这个常见错误系列会记录我在学习和使用laravel时遇到的一些问题的场景和解决方法. laravel文档:传送门 错误场景:我在web.p ...
- laravel 5.5 The page has expired due to inactivity. Please refresh and try again
在laravel框架中有此要求:任何指向 web 中 POST, PUT 或 DELETE 路由的 HTML 表单请求都应该包含一个 CSRF 令牌,否则,这个请求将会被拒绝 1.taiji/app/ ...
最新文章
- 艾伟_转载:C# Design Patterns (3) - Decorator
- app前后台交互php_PHP丨前端网页是怎么跟后台进行数据交互的(实战)
- bzoj 2435: [Noi2011]道路修建【树形dp】
- 用Django开发Web应用程序异常
- 什么是SAP OData Model Creator
- postman测试 上传下载文件
- 百度地图 android SDKv2.2.0
- Resteasy配置及其使用
- MySQL(基础知识)
- 通过webService下载sharepoint文档库文件
- 图片云存储(腾讯云 七牛云)
- python 实现省全称和省的简称互相转换
- 爱奇艺SOAR探索与实践
- 园区网的网关部署在接入层还是汇聚层 面试官与求职者之间谈话
- html5 端午节 龙舟,端午节看龙舟作文(精选5篇)
- 最新版学习笔记---Python机器学习基础教程(1)Irises(鸢尾花)分类---附完整代码
- Qt删除文件和文件夹
- CKP.CMP工作原理===
- 计算机组装训练知识总结,计算机组装维护实训总结
- webRTC(十一):webrtc 实时共享桌面
热门文章
- 消费管理系统java代码_SSH框架+Mysql数据库开发java web会员积分消费管理系统
- 台式计算机连接,台式电脑连接网络步骤
- AppNode受控端命令 - AppNode帮助中心
- 源码角度详解Redis缓存淘汰机制(Eviction)
- linux桌面 输入法 原理,安装ubuntu 7.10桌面版后无中文输入法的解决
- PDF阅读软件里面的小手工具打开/关闭
- php提取邮箱并返回,PHP 利用Mail_MimeDecode类提取邮件信息示例
- (每日更新)《虚拟现实VR资讯》(Yanlz+Unity+SteamVR+云技术+5G+AI=VR云游戏=云渲染+人机交互+立钻哥哥+==)
- python过滤敏感词汇_利用Python正则表达式过滤敏感词的方法
- php个人空间源码,PHP安装 - 牛牛牛大棚的个人空间 - OSCHINA - 中文开源技术交流社区...