mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-12-15 04:50:33 +08:00
新增兼容whip接口http头的 Authorization 的Bearer令牌 (#3849)
新增兼容whip接口http头的 Authorization 的Bearer令牌 转成 webhook 的 params的参数 , 即也支持rtc应用业务层回调推流 Authorization Bearer鉴权
This commit is contained in:
parent
df9dd3d17a
commit
ab22cac85b
@ -1845,8 +1845,9 @@ void installWebApi() {
|
||||
auto &allArgs = _args;
|
||||
CHECK_ARGS("app", "stream");
|
||||
|
||||
return StrPrinter << "rtc://" << _args["Host"] << "/" << _args["app"] << "/"
|
||||
<< _args["stream"] << "?" << _args.parser.params() + "&session=" + _session_id;
|
||||
string auth = _args["Authorization"]; // Authorization Bearer
|
||||
return StrPrinter << "rtc://" << _args["Host"] << "/" << _args["app"] << "/" << _args["stream"] << "?"
|
||||
<< _args.parser.params() + "&session=" + _session_id + (auth.empty() ? "" : ("&Authorization=" + auth));
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user