Skip to content

Commit

Permalink
Allow env var to configure forward
Browse files Browse the repository at this point in the history
  • Loading branch information
ssysm committed Nov 29, 2024
1 parent 7951bf3 commit eb3d700
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions trunk/src/app/srs_app_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5567,6 +5567,9 @@ int SrsConfig::get_global_chunk_size()
}

bool SrsConfig::get_forward_enabled(string vhost) {

SRS_OVERWRITE_BY_ENV_BOOL("srs.vhost.forward.enabled"); // SRS_VHOST_FORWARD_ENABLED

static bool DEFAULT = false;

SrsConfDirective* conf = get_vhost(vhost);
Expand All @@ -5579,6 +5582,9 @@ bool SrsConfig::get_forward_enabled(string vhost) {

bool SrsConfig::get_forward_enabled(SrsConfDirective* vhost)
{

SRS_OVERWRITE_BY_ENV_BOOL("srs.vhost.forward.enabled"); // SRS_VHOST_FORWARD_ENABLED

static bool DEFAULT = false;

SrsConfDirective* conf = vhost->get("forward");
Expand Down Expand Up @@ -5611,6 +5617,9 @@ SrsConfDirective* SrsConfig::get_forwards(string vhost)

SrsConfDirective* SrsConfig::get_forward_backend(string vhost)
{

SRS_OVERWRITE_BY_ENV_DIRECTIVE("srs.vhost.forward.backend"); // SRS_VHOST_FORWARD_BACKEND

SrsConfDirective* conf = get_vhost(vhost);
if (!conf) {
return NULL;
Expand Down

0 comments on commit eb3d700

Please sign in to comment.