当前位置:网站首页>Laravel swagger add access password
Laravel swagger add access password
2022-07-29 05:48:00 【Liaoshengping】
Catalog
It is fatal to expose interface documents to the outside , Therefore, it is necessary to properly protect the interface
When I use darkaonline/l5-swagger
No clear interface document protection measures were found during the package , The following provides a scheme relative to exposing interface documents .
Scheme 1 :
Method of route protection , stay config/l5-swagger.php
Modify this routing path , such as :
Option two :
Add in access token Parameters of
Modify file :resources\views\vendor\l5-swagger\index.blade.php
add to :
<?php
if (empty(request()->get('token')) || request()->get('token') != '112233') {
echo <<<HTML <div style="width: 100%;height: 100%;display: flex; align-items: center;justify-content: center"> <div > <div> <h1 style="color: #6ed162"> Interface document </h1> </div> <div> <form style="height: 100px" action="" method="get"> <input name="token"> <button> verification </button> </form> </div> </div> </div> HTML;
exit;
}
?>
above 112233
That's the access token It can be modified into its own
边栏推荐
- “山东大学移动互联网开发技术教学网站建设”项目实训日志六
- Display effect of uniapp page title
- JS simple code determines whether the device that opens the page is the PC end of the computer, the H5 end of the mobile phone, or the wechat end
- 解决表单校验提示信息不消失问题以及赋值不生效问题
- QPalette学习笔记
- DAY15:文件包含漏洞靶场手册(自用 file-include 靶场)
- 突破硬件瓶颈(一):Intel体系架构的发展与瓶颈挖掘
- Extreme deflation and perpetual motion machine model will promote the outbreak of platofarm
- 熊市慢慢,Bit.Store提供稳定Staking产品助你穿越牛熊
- Seay source code audit system
猜你喜欢
“山东大学移动互联网开发技术教学网站建设”项目实训日志五
How to survive in the bear market of encryption market?
Laravel服务容器(上下文绑定的运用)
超简单集成HMS ML Kit 实现parental control
DAY15(DAY16拓展):文件包含漏洞
DAY6:利用 PHP 编写文件上传页面
新手入门:手把手从PHP环境到ThinkPHP6框架下载
DAO赛道异军突起,M-DAO的优势在哪里?
Basic concepts of MySQL + database system structure + extended application + basic command learning
“山东大学移动互联网开发技术教学网站建设”项目实训日志七
随机推荐
Win10 搭建MSYS2环境
Thinkphp6管道模式Pipeline使用
Seay source code audit system
学习、研究编程之道
“山东大学移动互联网开发技术教学网站建设”项目实训日志七
解决表单校验提示信息不消失问题以及赋值不生效问题
Extreme deflation and perpetual motion machine model will promote the outbreak of platofarm
The bear market is slow, and bit.store provides stable stacking products to help you get through the bull and bear market
“山东大学移动互联网开发技术教学网站建设”项目实训日志一
记xx公司SQL注入漏洞
Wechat applet change attribute value -setdata- bidirectional binding -model
JDBC连接数据库详细步骤
Laravel Swagger添加访问密码
sql-server 数据表的简单操作
Build msys2 environment with win10
“山东大学移动互联网开发技术教学网站建设”项目实训日志二
Use QSS to style the form
第五空间智能安全⼤赛真题----------PNG图⽚转换器
MySQL decompressed version windows installation
Basic concepts of MySQL + database system structure + extended application + basic command learning