Skip to content

Commit

Permalink
prosody: configure lobby on the guest domain is necessary
Browse files Browse the repository at this point in the history
If the lobby is enabled and ENABLE_AUTH and ENABLE_GUESTS is true, and
therefore the guest.$XMPP_DOMAIN domain is to be defined, the lobby config
should be placed in the guest domain.
  • Loading branch information
ChrisPortman committed Aug 13, 2020
1 parent bcbd977 commit bec928c
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" }
http_default_host = "{{ .Env.XMPP_DOMAIN }}"

{{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }}
{{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool)}}
{{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }}
{{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" }}
{{ $JWT_ALLOW_EMPTY := .Env.JWT_ALLOW_EMPTY | default "0" | toBool }}
Expand Down Expand Up @@ -53,7 +54,7 @@ VirtualHost "{{ .Env.XMPP_DOMAIN }}"
"ping";
"speakerstats";
"conference_duration";
{{ if $ENABLE_LOBBY }}
{{ if and $ENABLE_LOBBY (not $ENABLE_GUEST_DOMAIN) }}
"muc_lobby_rooms";
{{ end }}
{{ if .Env.XMPP_MODULES }}
Expand All @@ -64,7 +65,7 @@ VirtualHost "{{ .Env.XMPP_DOMAIN }}"
{{end}}
}

{{ if $ENABLE_LOBBY }}
{{ if and $ENABLE_LOBBY (not $ENABLE_GUEST_DOMAIN) }}
main_muc = "{{ .Env.XMPP_MUC_DOMAIN }}"
lobby_muc = "lobby.{{ .Env.XMPP_DOMAIN }}"
{{ end }}
Expand All @@ -74,10 +75,20 @@ VirtualHost "{{ .Env.XMPP_DOMAIN }}"

c2s_require_encryption = false

{{ if and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool) }}
{{ if $ENABLE_GUEST_DOMAIN }}
VirtualHost "{{ .Env.XMPP_GUEST_DOMAIN }}"
authentication = "anonymous"
c2s_require_encryption = false

{{ if $ENABLE_LOBBY }}
modules_enabled = {
"muc_lobby_rooms";
}

main_muc = "{{ .Env.XMPP_MUC_DOMAIN }}"
lobby_muc = "lobby.{{ .Env.XMPP_DOMAIN }}"
{{ end }}

{{ end }}

VirtualHost "{{ .Env.XMPP_AUTH_DOMAIN }}"
Expand Down

0 comments on commit bec928c

Please sign in to comment.