web: add ability to change CORS header value

pull/1769/head^2
simon 8 months ago committed by GitHub
parent 03b6ca24f2
commit 8094a173f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      docker-compose.yml
  2. 5
      web/rootfs/defaults/meet.conf

@ -25,6 +25,7 @@ services:
- COLIBRI_WEBSOCKET_JVB_LOOKUP_NAME - COLIBRI_WEBSOCKET_JVB_LOOKUP_NAME
- COLIBRI_WEBSOCKET_REGEX - COLIBRI_WEBSOCKET_REGEX
- CONFCODE_URL - CONFCODE_URL
- CORS_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN
- DEFAULT_LANGUAGE - DEFAULT_LANGUAGE
- DEPLOYMENTINFO_ENVIRONMENT - DEPLOYMENTINFO_ENVIRONMENT
- DEPLOYMENTINFO_ENVIRONMENT_TYPE - DEPLOYMENTINFO_ENVIRONMENT_TYPE

@ -8,6 +8,7 @@
{{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}} {{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}}
{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} {{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
{{ $XMPP_BOSH_URL_BASE := .Env.XMPP_BOSH_URL_BASE | default "http://xmpp.meet.jitsi:5280" -}} {{ $XMPP_BOSH_URL_BASE := .Env.XMPP_BOSH_URL_BASE | default "http://xmpp.meet.jitsi:5280" -}}
{{ $CORS_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN := .Env.CORS_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN | default "*" }}
server_name _; server_name _;
@ -60,7 +61,7 @@ location = /_api/room-info {
# ensure all static content can always be found first # ensure all static content can always be found first
location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$ { location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$ {
add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Origin' '{{ $CORS_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN }}';
alias /usr/share/jitsi-meet/$1/$2; alias /usr/share/jitsi-meet/$1/$2;
# cache all versioned files # cache all versioned files
@ -192,7 +193,7 @@ location @root_path {
rewrite ^/_load-test/(.*)$ /load-test/index.html break; rewrite ^/_load-test/(.*)$ /load-test/index.html break;
} }
location ~ ^/_load-test/libs/(.*)$ { location ~ ^/_load-test/libs/(.*)$ {
add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Origin' '{{ $CORS_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN }}';
alias /usr/share/jitsi-meet/load-test/libs/$1; alias /usr/share/jitsi-meet/load-test/libs/$1;
} }

Loading…
Cancel
Save