File tree 3 files changed +49
-1
lines changed
prosody/rootfs/defaults/conf.d 3 files changed +49
-1
lines changed Original file line number Diff line number Diff line change 16
16
{{ $TURNS_PORT := .Env .TURNS_PORT | default " 443" }}
17
17
{{ $XMPP_MUC_DOMAIN_PREFIX := (split " ." .Env .XMPP_MUC_DOMAIN )._0 }}
18
18
{{ $DISABLE_POLLS := .Env .DISABLE_POLLS | default " false" | toBool - }}
19
+ {{ $ENABLE_SUBDOMAINS := .Env .ENABLE_SUBDOMAINS | default " true" | toBool - }}
19
20
20
21
admins = {
21
22
" {{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}" ,
@@ -216,6 +217,9 @@ Component "{{ .Env.XMPP_MUC_DOMAIN }}" "muc"
216
217
{{ if not $DISABLE_POLLS - }}
217
218
" polls" ;
218
219
{{ end - }}
220
+ {{ if $ENABLE_SUBDOMAINS - }}
221
+ " muc_domain_mapper" ;
222
+ {{ end - }}
219
223
}
220
224
muc_room_cache_size = 1000
221
225
muc_room_locking = false
@@ -249,4 +253,10 @@ Component "breakout.{{ .Env.XMPP_DOMAIN }}" "muc"
249
253
restrict_room_creation = true
250
254
muc_room_locking = false
251
255
muc_room_default_public_jids = true
256
+ modules_enabled = {
257
+ " muc_meeting_id" ;
258
+ {{ if $ENABLE_SUBDOMAINS - }}
259
+ " muc_domain_mapper" ;
260
+ {{ end - }}
261
+ }
252
262
{{ end }}
Original file line number Diff line number Diff line change 1
1
{{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool }}
2
2
{{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool }}
3
+ {{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}}
3
4
4
5
server_name _;
5
6
@@ -104,3 +105,40 @@ location /etherpad/ {
104
105
proxy_buffering off;
105
106
}
106
107
{{ end }}
108
+
109
+ {{ if $ENABLE_SUBDOMAINS }}
110
+ location ~ ^/([^/?&:'"]+)/config.js$
111
+ {
112
+ set $subdomain "$1.";
113
+ set $subdir "$1/";
114
+
115
+ alias /config/config.js;
116
+ }
117
+
118
+ # BOSH for subdomains
119
+ location ~ ^/([^/?&:'"]+)/http-bind {
120
+ set $subdomain "$1.";
121
+ set $subdir "$1/";
122
+ set $prefix "$1";
123
+
124
+ rewrite ^/(.*)$ /http-bind;
125
+ }
126
+
127
+ {{ if $ENABLE_XMPP_WEBSOCKET }}
128
+ # websockets for subdomains
129
+ location ~ ^/([^/?&:'"]+)/xmpp-websocket {
130
+ set $subdomain "$1.";
131
+ set $subdir "$1/";
132
+ set $prefix "$1";
133
+
134
+ rewrite ^/(.*)$ /xmpp-websocket;
135
+ }
136
+ {{ end }}
137
+
138
+ # Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
139
+ location ~ ^/([^/?&:'"]+)/(.*)$ {
140
+ set $subdomain "$1.";
141
+ set $subdir "$1/";
142
+ rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
143
+ }
144
+ {{ end }}
Original file line number Diff line number Diff line change 1
1
{ { $CONFIG_EXTERNAL_CONNECT := . Env . CONFIG_EXTERNAL_CONNECT | default "false" | toBool - } }
2
2
{ { $ENABLE_AUTH := . Env . ENABLE_AUTH | default "false" | toBool - } }
3
3
{ { $ENABLE_GUESTS := . Env . ENABLE_GUESTS | default "false" | toBool - } }
4
- { { $ENABLE_SUBDOMAINS := . Env . ENABLE_SUBDOMAINS | default "false " | toBool - } }
4
+ { { $ENABLE_SUBDOMAINS := . Env . ENABLE_SUBDOMAINS | default "true " | toBool - } }
5
5
{ { $ENABLE_XMPP_WEBSOCKET := . Env . ENABLE_XMPP_WEBSOCKET | default "1" | toBool - } }
6
6
{ { $JICOFO_AUTH_USER := . Env . JICOFO_AUTH_USER | default "focus" } }
7
7
{ { $PUBLIC_URL_DOMAIN := . Env . PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" - } }
You can’t perform that action at this time.
0 commit comments