1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-12 11:21:52 +00:00

Allow env var to configure forward

This commit is contained in:
Shengming Yuan 2024-11-28 22:07:54 -05:00
parent 7951bf3bd6
commit eb3d700499

View file

@ -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);
@ -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");
@ -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;