mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 03:31:45 +08:00
来自127.0.0.1的http api请求开启secret校验
防止http代理越过鉴权
This commit is contained in:
@@ -229,11 +229,9 @@ bool checkArgs(Args &args, const First &first, const KeyTypes &...keys) {
|
||||
if (!HttpFileManager::isIPAllowed(ip)) { \
|
||||
throw AuthException("Your ip is not allowed to access the service."); \
|
||||
} \
|
||||
if (ip != "127.0.0.1") { \
|
||||
CHECK_ARGS("secret"); \
|
||||
if (api_secret != allArgs["secret"]) { \
|
||||
throw AuthException("secret错误"); \
|
||||
} \
|
||||
CHECK_ARGS("secret"); \
|
||||
if (api_secret != allArgs["secret"]) { \
|
||||
throw AuthException("secret错误"); \
|
||||
} \
|
||||
} while(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user