diff --git a/docker-compose.yml b/docker-compose.yml index f8b3d45..ab524e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,7 @@ services: - AUDIO_QUALITY_OPUS_BITRATE - AUTO_CAPTION_ON_RECORD - BRANDING_DATA_URL + - BOSH_RELATIVE - CALLSTATS_CUSTOM_SCRIPT_URL - CALLSTATS_ID - CALLSTATS_SECRET diff --git a/web/rootfs/defaults/system-config.js b/web/rootfs/defaults/system-config.js index 2d6f8d0..5dbe4b2 100644 --- a/web/rootfs/defaults/system-config.js +++ b/web/rootfs/defaults/system-config.js @@ -1,3 +1,4 @@ +{{ $BOSH_RELATIVE := .Env.BOSH_RELATIVE | default "false" | toBool -}} {{ $CONFIG_EXTERNAL_CONNECT := .Env.CONFIG_EXTERNAL_CONNECT | default "false" | toBool -}} {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "false" | toBool -}} {{ $ENABLE_AUTH_DOMAIN := .Env.ENABLE_AUTH_DOMAIN | default "true" | toBool -}} @@ -44,7 +45,19 @@ config.hosts.authdomain = '{{ $XMPP_DOMAIN }}'; {{ end -}} {{ end -}} +{{ if $BOSH_RELATIVE -}} +{{ if $ENABLE_SUBDOMAINS -}} +config.bosh = '/'+ subdir + 'http-bind'; +{{ else -}} config.bosh = '/http-bind'; +{{ end -}} +{{ else -}} +{{ if $ENABLE_SUBDOMAINS -}} +config.bosh = 'https://{{ $PUBLIC_URL_DOMAIN}}/' + subdir + 'http-bind'; +{{ else -}} +config.bosh = 'https://{{ $PUBLIC_URL_DOMAIN}}/http-bind'; +{{ end -}} +{{ end -}} {{ if $ENABLE_XMPP_WEBSOCKET -}} {{ if $ENABLE_SUBDOMAINS -}}