From af50ddeecbe3b8a7d7754d0885ab0ff47104b712 Mon Sep 17 00:00:00 2001 From: Aaron van Meerten Date: Fri, 13 Oct 2023 14:52:28 -0500 Subject: [PATCH] prosody: s2s whitelist duplicate param fix (#1625) --- prosody/rootfs/defaults/prosody.cfg.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prosody/rootfs/defaults/prosody.cfg.lua b/prosody/rootfs/defaults/prosody.cfg.lua index 83a4801..c72a06d 100644 --- a/prosody/rootfs/defaults/prosody.cfg.lua +++ b/prosody/rootfs/defaults/prosody.cfg.lua @@ -179,6 +179,7 @@ c2s_interfaces = { "*" } -- set s2s port s2s_ports = { {{ $S2S_PORT }} } -- Listen on specific s2s port +{{ if eq .Env.PROSODY_MODE "visitors" -}} s2s_whitelist = { {{ if $ENABLE_VISITORS -}} '{{ $XMPP_MUC_DOMAIN }}'; -- needed for visitors to send messages to main room @@ -192,6 +193,8 @@ s2s_whitelist = { } {{ end -}} +{{ end -}} + {{ if $ENABLE_VISITORS -}} {{ if $.Env.VISITORS_XMPP_SERVER -}} s2sout_override = { @@ -202,6 +205,7 @@ s2sout_override = { ["v{{ $index }}.{{ $VISITORS_XMPP_DOMAIN }}"] = "tcp://{{ $SERVER._0 }}:{{ $SERVER._1 | default $DEFAULT_PORT }}"; {{ end -}} }; +{{ if ne .Env.PROSODY_MODE "visitors" -}} s2s_whitelist = { {{ range $index, $element := $VISITORS_XMPP_SERVERS -}} "{{ $VISITORS_MUC_PREFIX }}.v{{ $index }}.{{ $VISITORS_XMPP_DOMAIN }}"; @@ -209,6 +213,7 @@ s2s_whitelist = { }; {{ end -}} {{ end -}} +{{ end -}} -- Force certificate authentication for server-to-server connections?