feat(prosody): allow s2s whitelist additions (#1940)

* feat(prosody): allow s2s whitelist additions

* change to vhost name to reflect additional uses

* whitespace improvement
pull/1942/head
Aaron van Meerten 1 month ago committed by GitHub
parent b89c328eb0
commit a88c6e4195
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      docker-compose.yml
  2. 6
      prosody/rootfs/defaults/conf.d/visitors.cfg.lua
  3. 16
      prosody/rootfs/defaults/prosody.cfg.lua

@ -291,6 +291,7 @@ services:
- PROSODY_TRUSTED_PROXIES
- PROSODY_VISITOR_INDEX
- PROSODY_VISITORS_MUC_PREFIX
- PROSODY_VISITORS_S2S_VHOSTS
- PUBLIC_URL
- STUN_HOST
- STUN_PORT

@ -104,6 +104,12 @@ s2sout_override = {
{{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS -}}
["{{ $XMPP_RECORDER_DOMAIN }}"] = "tcp://{{ $XMPP_SERVER }}:{{ $XMPP_SERVER_S2S_PORT }}";
{{ end -}}
{{ if .Env.PROSODY_VISITORS_S2S_VHOSTS -}}
{{- range $index, $vhost := (splitList "," .Env.PROSODY_VISITORS_S2S_VHOSTS | compact) }}
["{{ $vhost }}"] = "tcp://{{ $XMPP_SERVER }}:{{ $XMPP_SERVER_S2S_PORT }}";
{{ end -}}
{{ end -}}
}
muc_limit_messages_count = 10;

@ -224,20 +224,22 @@ s2s_ports = { {{ $S2S_PORT }} } -- Listen on specific s2s port
{{ if eq $PROSODY_MODE "visitors" -}}
s2s_whitelist = {
{{ if $ENABLE_VISITORS -}}
{{- if $ENABLE_VISITORS }}
'{{ $XMPP_MUC_DOMAIN }}'; -- needed for visitors to send messages to main room
'visitors.{{ $XMPP_DOMAIN }}'; -- needed for sending promotion request to visitors.{{ $XMPP_DOMAIN }} component
'{{ $XMPP_DOMAIN }}'; -- unavailable presences back to main room
{{- end }}
{{ end -}}
{{ if $ENABLE_GUEST_DOMAIN -}}
{{- if $ENABLE_GUEST_DOMAIN }}
'{{ $XMPP_GUEST_DOMAIN }}';
{{ end }}
{{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS -}}
{{- end }}
{{ if or $ENABLE_RECORDING $ENABLE_TRANSCRIPTIONS -}}
'{{ $XMPP_RECORDER_DOMAIN }}';
{{- end }}
{{ end -}}
{{- if .Env.PROSODY_VISITORS_S2S_VHOSTS }}
'{{ join "';\n '" (splitList "," .Env.PROSODY_VISITORS_S2S_VHOSTS | compact) }}';
{{- end }}
}
{{ end -}}

Loading…
Cancel
Save