diff --git a/docker-compose.yml b/docker-compose.yml index bf4a148..0eed649 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,6 +34,8 @@ services: - CONFIG_EXTERNAL_CONNECT - DEPLOYMENTINFO_ENVIRONMENT - DEPLOYMENTINFO_ENVIRONMENT_TYPE + - DEPLOYMENTINFO_REGION + - DEPLOYMENTINFO_SHARD - DEPLOYMENTINFO_USERREGION - DIALIN_NUMBERS_URL - DIALOUT_AUTH_URL diff --git a/web/rootfs/defaults/meet.conf b/web/rootfs/defaults/meet.conf index de3ad30..7ed2d91 100644 --- a/web/rootfs/defaults/meet.conf +++ b/web/rootfs/defaults/meet.conf @@ -18,6 +18,10 @@ error_page 404 /static/404.html; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; +{{ if .Env.DEPLOYMENTINFO_SHARD }} +add_header X-Jitsi-Shard {{ .Env.DEPLOYMENTINFO_SHARD }}; +{{ end }} + location = /config.js { alias /config/config.js; } diff --git a/web/rootfs/defaults/settings-config.js b/web/rootfs/defaults/settings-config.js index 68cb9c7..21a68f9 100644 --- a/web/rootfs/defaults/settings-config.js +++ b/web/rootfs/defaults/settings-config.js @@ -284,10 +284,18 @@ if (!config.hasOwnProperty('deploymentInfo')) config.deploymentInfo = {}; config.deploymentInfo.environment = '{{ .Env.DEPLOYMENTINFO_ENVIRONMENT }}'; {{ end -}} +{{ if .Env.DEPLOYMENTINFO_SHARD -}} +config.deploymentInfo.shard = '{{ .Env.DEPLOYMENTINFO_SHARD }}'; +{{ end -}} + {{ if .Env.DEPLOYMENTINFO_ENVIRONMENT_TYPE -}} config.deploymentInfo.envType = '{{ .Env.DEPLOYMENTINFO_ENVIRONMENT_TYPE }}'; {{ end -}} +{{ if .Env.DEPLOYMENTINFO_REGION -}} +config.deploymentInfo.region = '{{ .Env.DEPLOYMENTINFO_REGION }}'; +{{ end -}} + {{ if $DEPLOYMENTINFO_USERREGION -}} config.deploymentInfo.userRegion = '{{ $DEPLOYMENTINFO_USERREGION }}'; {{ end -}}