Sunil Mohan Adapa fd9e1927e5
email: Simplify modifying headers proxied to rspamd web UI
There is no need to remove many headers explicitly after doing ProxyAddHeaders
off. If those headers are set by the client, that will merely result in an
unnecessary password dialog.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-03-02 07:37:34 -05:00

31 lines
1010 B
Plaintext

# Serve rspamd web UI:
# https://www.rspamd.com/doc/faq.html#how-to-use-the-webui-behind-a-proxy-server
<LocationMatch "^/rspamd$">
Redirect "/rspamd/"
</LocationMatch>
<Location "/rspamd/">
ProxyPass http://127.0.0.1:11334/
ProxyPassReverse http://127.0.0.1:11334/
# Don't add X-Forwarded* headers to make rspamd think that request is coming
# from localhost. This disables rspamd's password auth mechanism in favor of
# FreedomBox authentication and authorization below.
ProxyAddHeaders off
# Require SSO
Include includes/freedombox-single-sign-on.conf
<IfModule mod_auth_pubtkt.c>
TKTAuthToken "admin"
</IfModule>
</Location>
# Automatic configuration for clients like Thunderbird:
# https://wiki.mozilla.org/Thunderbird:Autoconfiguration#Implementation
<Location "/.well-known/autoconfig/mail/config-v1.1.xml">
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^ /plinth/apps/email/config.xml [PT]
</IfModule>
</Location>