当前位置:网站首页>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
边栏推荐
- MOVE PROTOCOL全球健康宣言,将健康运动进行到底
- 裸金属云FASS高性能弹性块存储解决方案
- QFrame类学习笔记
- Relationship between redrawing and reflow
- Crypto巨头们ALL IN元宇宙,PlatoFarm或能突围
- 【电子电路】ADC芯片如何选型
- Elastic box flex
- xSAN高可用—XDFS与SAN融合焕发新生命力
- Fantom (FTM) surged 45% before the FOMC meeting
- Solve the problem that the prompt information of form verification does not disappear and the assignment does not take effect
猜你喜欢

Merge the same items in the same column in table

ThinkPHP6 输出二维码图片格式 解决与 Debug 的冲突

裸金属云FASS高性能弹性块存储解决方案

sql-server 数据表的简单操作

MOVE PROTOCOL全球健康宣言,将健康运动进行到底

深度学习的趣味app简单优化(适合新手)

Move protocol global health declaration, carry out the health campaign to the end

Installation steps and environment configuration of vs Code

“山东大学移动互联网开发技术教学网站建设”项目实训日志七

Seay源代码审计系统
随机推荐
马斯克推崇的柏拉图式元宇宙,PlatoFarm早已验证出答案
Wechat applet - component parameter transmission, state management
实现table某个单元格背景色设置
深度学习的趣味app简单优化(适合新手)
Gluster集群管理小分析
熊市慢慢,Bit.Store提供稳定Staking产品助你穿越牛熊
打印出1-100之间的所有质数
性能对比|FASS iSCSI vs NVMe/TCP
记xx公司SQL注入漏洞
超简单集成HMS ML Kit 实现parental control
第五空间智能安全⼤赛真题----------PNG图⽚转换器
Hcia-r & s self use notes (25) NAT technical background, NAT type and configuration
量化开发必掌握的30个知识点【什么是Level-2数据】
7 月 28 日 ENS/USD 价值预测:ENS 吸引巨额利润
Extreme deflation and perpetual motion machine model will promote the outbreak of platofarm
“山东大学移动互联网开发技术教学网站建设”项目实训日志六
Cmu15-213 shell lab experiment record
获取水仙花数
一文读懂Move2Earn项目——MOVE
H5 semantic label