Skip to content

Commit

Permalink
web: add ability to change CORS header value
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-kaiser authored Mar 26, 2024
1 parent 03b6ca2 commit 8094a17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
- COLIBRI_WEBSOCKET_JVB_LOOKUP_NAME
- COLIBRI_WEBSOCKET_REGEX
- CONFCODE_URL
- CORS_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN
- DEFAULT_LANGUAGE
- DEPLOYMENTINFO_ENVIRONMENT
- DEPLOYMENTINFO_ENVIRONMENT_TYPE
Expand Down
5 changes: 3 additions & 2 deletions web/rootfs/defaults/meet.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}}
{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
{{ $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 _;

Expand Down Expand Up @@ -60,7 +61,7 @@ location = /_api/room-info {

# ensure all static content can always be found first
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;

# cache all versioned files
Expand Down Expand Up @@ -192,7 +193,7 @@ location @root_path {
rewrite ^/_load-test/(.*)$ /load-test/index.html break;
}
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;
}

Expand Down

0 comments on commit 8094a17

Please sign in to comment.