2022-08-31 17:07:38 +00:00
|
|
|
# Unchanged copy of
|
|
|
|
# https://github.com/jitsi/docker-jitsi-meet/blob/stable-7648-4/web/rootfs/defaults/meet.conf
|
|
|
|
# Licensed under the ASL v2.
|
|
|
|
|
|
|
|
{{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool }}
|
|
|
|
{{ $ENABLE_JAAS_COMPONENTS := .Env.ENABLE_JAAS_COMPONENTS | default "0" | toBool }}
|
2021-03-17 13:03:09 -07:00
|
|
|
{{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool }}
|
2022-08-31 17:07:38 +00:00
|
|
|
{{ $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" -}}
|
2021-03-17 13:03:09 -07:00
|
|
|
|
2020-04-14 15:43:53 -07:00
|
|
|
server_name _;
|
|
|
|
|
|
|
|
client_max_body_size 0;
|
|
|
|
|
|
|
|
root /usr/share/jitsi-meet;
|
2021-03-17 13:03:09 -07:00
|
|
|
|
|
|
|
# ssi on with javascript for multidomain variables in config.js
|
|
|
|
ssi on;
|
|
|
|
ssi_types application/x-javascript application/javascript;
|
|
|
|
|
|
|
|
index index.html index.htm;
|
2020-04-14 15:43:53 -07:00
|
|
|
error_page 404 /static/404.html;
|
|
|
|
|
2021-03-17 13:03:09 -07:00
|
|
|
# Security headers
|
|
|
|
add_header X-Content-Type-Options nosniff;
|
|
|
|
add_header X-XSS-Protection "1; mode=block";
|
2020-04-14 15:43:53 -07:00
|
|
|
|
2022-08-31 17:07:38 +00:00
|
|
|
{{ if .Env.DEPLOYMENTINFO_SHARD }}
|
|
|
|
add_header X-Jitsi-Shard {{ .Env.DEPLOYMENTINFO_SHARD }};
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
# Opt out of FLoC (deprecated)
|
|
|
|
add_header Permissions-Policy "interest-cohort=()";
|
|
|
|
|
2021-03-17 13:03:09 -07:00
|
|
|
location = /config.js {
|
2020-04-14 15:43:53 -07:00
|
|
|
alias /config/config.js;
|
|
|
|
}
|
|
|
|
|
2021-03-17 13:03:09 -07:00
|
|
|
location = /interface_config.js {
|
2020-04-14 15:43:53 -07:00
|
|
|
alias /config/interface_config.js;
|
|
|
|
}
|
|
|
|
|
2021-03-17 13:03:09 -07:00
|
|
|
location = /external_api.js {
|
2020-04-14 15:43:53 -07:00
|
|
|
alias /usr/share/jitsi-meet/libs/external_api.min.js;
|
|
|
|
}
|
|
|
|
|
2022-08-31 17:07:38 +00:00
|
|
|
{{ if $ENABLE_JAAS_COMPONENTS }}
|
|
|
|
location = /_api/room-info {
|
|
|
|
proxy_pass {{ $XMPP_BOSH_URL_BASE }}/room-info?prefix=$prefix&$args;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
}
|
|
|
|
{{ end }}
|
|
|
|
|
2021-03-17 13:03:09 -07:00
|
|
|
# ensure all static content can always be found first
|
2022-08-31 17:07:38 +00:00
|
|
|
location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$ {
|
2021-03-17 13:03:09 -07:00
|
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
|
|
alias /usr/share/jitsi-meet/$1/$2;
|
2022-08-31 17:07:38 +00:00
|
|
|
|
|
|
|
# cache all versioned files
|
|
|
|
if ($arg_v) {
|
|
|
|
expires 1y;
|
|
|
|
}
|
2021-03-17 13:03:09 -07:00
|
|
|
}
|
|
|
|
|
2022-08-31 17:07:38 +00:00
|
|
|
{{ if $ENABLE_COLIBRI_WEBSOCKET }}
|
2021-03-17 13:03:09 -07:00
|
|
|
# colibri (JVB) websockets
|
2022-08-31 17:07:38 +00:00
|
|
|
location ~ ^/colibri-ws/([a-zA-Z0-9-\._]+)/(.*) {
|
|
|
|
tcp_nodelay on;
|
|
|
|
|
2021-03-17 13:03:09 -07:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
2022-08-31 17:07:38 +00:00
|
|
|
proxy_set_header Connection $connection_upgrade;
|
|
|
|
|
|
|
|
proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args;
|
2020-04-14 15:43:53 -07:00
|
|
|
}
|
2022-08-31 17:07:38 +00:00
|
|
|
{{ end }}
|
2020-04-14 15:43:53 -07:00
|
|
|
|
|
|
|
# BOSH
|
2021-03-17 13:03:09 -07:00
|
|
|
location = /http-bind {
|
2020-04-14 15:43:53 -07:00
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2022-08-31 17:07:38 +00:00
|
|
|
proxy_set_header Host {{ $XMPP_DOMAIN }};
|
|
|
|
|
|
|
|
proxy_pass {{ $XMPP_BOSH_URL_BASE }}/http-bind;
|
2021-03-17 13:03:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
{{ if $ENABLE_XMPP_WEBSOCKET }}
|
|
|
|
# xmpp websockets
|
|
|
|
location = /xmpp-websocket {
|
2022-08-31 17:07:38 +00:00
|
|
|
tcp_nodelay on;
|
2021-03-17 13:03:09 -07:00
|
|
|
|
2022-08-31 17:07:38 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Connection $connection_upgrade;
|
2021-03-17 13:03:09 -07:00
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
2022-08-31 17:07:38 +00:00
|
|
|
proxy_set_header Host {{ $XMPP_DOMAIN }};
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2021-03-17 13:03:09 -07:00
|
|
|
|
2022-08-31 17:07:38 +00:00
|
|
|
proxy_pass {{ $XMPP_BOSH_URL_BASE }}/xmpp-websocket;
|
|
|
|
}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ if .Env.ETHERPAD_URL_BASE }}
|
|
|
|
# Etherpad-lite
|
|
|
|
location ^~ /etherpad/ {
|
|
|
|
proxy_buffering off;
|
|
|
|
proxy_cache_bypass $http_upgrade;
|
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
2021-03-17 13:03:09 -07:00
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
2022-08-31 17:07:38 +00:00
|
|
|
|
|
|
|
proxy_pass {{ .Env.ETHERPAD_URL_BASE }}/;
|
2021-03-17 13:03:09 -07:00
|
|
|
}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
location ~ ^/([^/?&:'"]+)$ {
|
|
|
|
try_files $uri @root_path;
|
|
|
|
}
|
|
|
|
|
|
|
|
location @root_path {
|
|
|
|
rewrite ^/(.*)$ / break;
|
2020-04-14 15:43:53 -07:00
|
|
|
}
|
|
|
|
|
2022-08-31 17:07:38 +00:00
|
|
|
{{ if $ENABLE_SUBDOMAINS }}
|
|
|
|
location ~ ^/([^/?&:'"]+)/config.js$ {
|
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
|
|
|
|
|
|
|
alias /config/config.js;
|
|
|
|
}
|
|
|
|
|
|
|
|
# BOSH for subdomains
|
|
|
|
location ~ ^/([^/?&:'"]+)/http-bind {
|
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
|
|
|
set $prefix "$1";
|
|
|
|
|
|
|
|
rewrite ^/(.*)$ /http-bind;
|
|
|
|
}
|
|
|
|
|
|
|
|
{{ if $ENABLE_XMPP_WEBSOCKET }}
|
|
|
|
# websockets for subdomains
|
|
|
|
location ~ ^/([^/?&:'"]+)/xmpp-websocket {
|
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
|
|
|
set $prefix "$1";
|
|
|
|
|
|
|
|
rewrite ^/(.*)$ /xmpp-websocket;
|
|
|
|
}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ if $ENABLE_JAAS_COMPONENTS }}
|
|
|
|
location ~ ^/([^/?&:'"]+)/_api/room-info {
|
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
|
|
|
set $prefix "$1";
|
|
|
|
|
|
|
|
rewrite ^/(.*)$ /_api/room-info;
|
|
|
|
}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
# Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
|
|
|
|
location ~ ^/([^/?&:'"]+)/(.*)$ {
|
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
|
|
|
rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
|
|
|
|
}
|
2021-03-17 13:03:09 -07:00
|
|
|
{{ end }}
|