mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-06 10:57:50 +08:00
修复videostack开启后编译失败问题
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
Linux_Python / build (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS_Python / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows_Python / build (push) Has been cancelled
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
Linux_Python / build (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS_Python / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows_Python / build (push) Has been cancelled
This commit is contained in:
parent
3a35144243
commit
3514376a97
@ -718,7 +718,8 @@ static constexpr char kLoginedCookieName[] = "ZLM_LOGINED";
|
||||
static constexpr size_t kUnLoginCookieLifeSeconds = 60;
|
||||
static constexpr size_t kLoginedCookieLifeSeconds = 24 * 3600;
|
||||
|
||||
void check_secret(toolkit::SockInfo &sender, mediakit::HttpSession::KeyValue &headerOut, const ArgsMap &allArgs, Json::Value &val) {
|
||||
template <typename T>
|
||||
void check_secret(toolkit::SockInfo &sender, mediakit::HttpSession::KeyValue &headerOut, const HttpAllArgs<T> &allArgs, Json::Value &val) {
|
||||
GET_CONFIG(bool, legacy_auth , API::kLegacyAuth);
|
||||
GET_CONFIG(std::string, api_secret, API::kSecret);
|
||||
|
||||
@ -744,6 +745,11 @@ void check_secret(toolkit::SockInfo &sender, mediakit::HttpSession::KeyValue &he
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template void check_secret<ApiArgsType>(toolkit::SockInfo &, mediakit::HttpSession::KeyValue &, const HttpAllArgs<ApiArgsType> &, Json::Value &);
|
||||
template void check_secret<Json::Value>(toolkit::SockInfo &, mediakit::HttpSession::KeyValue &, const HttpAllArgs<Json::Value> &, Json::Value &);
|
||||
template void check_secret<std::string>(toolkit::SockInfo &, mediakit::HttpSession::KeyValue &, const HttpAllArgs<std::string> &, Json::Value &);
|
||||
|
||||
/**
|
||||
* 安装api接口
|
||||
* 所有api都支持GET和POST两种方式
|
||||
|
||||
@ -234,7 +234,8 @@ bool checkArgs(Args &args, const Key &key, const KeyTypes &...keys) {
|
||||
// Check whether the http parameters contain the secret key, the ip of 127.0.0.1 does not check the key
|
||||
// 同时检测是否在ip白名单内 [AUTO-TRANSLATED:d12f963d]
|
||||
// Check whether it is in the ip whitelist at the same time
|
||||
void check_secret(toolkit::SockInfo &sender, mediakit::HttpSession::KeyValue &headerOut, const ArgsMap &allArgs, Json::Value &val);
|
||||
template <typename T>
|
||||
void check_secret(toolkit::SockInfo &sender, mediakit::HttpSession::KeyValue &headerOut, const HttpAllArgs<T> &allArgs, Json::Value &val);
|
||||
#define CHECK_SECRET() check_secret(sender, headerOut, allArgs, val)
|
||||
|
||||
void installWebApi();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user