mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 04:46:26 +00:00
feat(中间件): 添加演示环境IP白名单功能
在演示环境中间件中添加IP白名单检查,只有白名单中的IP才能执行非GET请求
This commit is contained in:
@@ -179,6 +179,10 @@ class Settings(BaseSettings):
|
||||
DEMO_BLACK_LIST_PATH: List[str] = [ # 演示黑名单
|
||||
"/auth/login"
|
||||
]
|
||||
DEMO_IP_WHITE_LIST: List[str] = [ # 演示白名单IP
|
||||
"192.168.18.7",
|
||||
"192.168.1.3"
|
||||
]
|
||||
|
||||
# ================================================= #
|
||||
# ***************** 静态文件配置 ***************** #
|
||||
|
||||
Reference in New Issue
Block a user