1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

support edge token traverse, fix #104. 0.9.129

This commit is contained in:
winlin 2014-06-21 12:39:04 +08:00
parent 10953c9743
commit 41857edaee
7 changed files with 168 additions and 5 deletions

View file

@ -509,7 +509,8 @@ int SrsConfig::reload()
//
// always support reload without additional code:
// chunk_size, ff_log_dir, max_connections,
// bandcheck, http_hooks, heartbeat
// bandcheck, http_hooks, heartbeat,
// token_traverse
// merge config: listen
if (!srs_directive_equals(root->get("listen"), old_root->get("listen"))) {
@ -1987,6 +1988,22 @@ SrsConfDirective* SrsConfig::get_vhost_edge_origin(string vhost)
return conf->get("origin");
}
bool SrsConfig::get_vhost_edge_token_traverse(std::string vhost)
{
SrsConfDirective* conf = get_vhost(vhost);
if (!conf) {
return false;
}
conf = conf->get("token_traverse");
if (!conf || conf->arg0() != "on") {
return false;
}
return true;
}
SrsConfDirective* SrsConfig::get_transcode(string vhost, string scope)
{
SrsConfDirective* conf = get_vhost(vhost);