mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-25 09:21:10 +00:00
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>
This commit is contained in:
parent
b3a04ebce9
commit
fd9e1927e5
@ -1,3 +1,5 @@
|
||||
# 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>
|
||||
@ -5,18 +7,12 @@
|
||||
<Location "/rspamd/">
|
||||
ProxyPass http://127.0.0.1:11334/
|
||||
ProxyPassReverse http://127.0.0.1:11334/
|
||||
# Modify proxy headers
|
||||
|
||||
# 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
|
||||
RequestHeader unset Forwarded
|
||||
RequestHeader unset Via
|
||||
RequestHeader unset X-Forwarded-For
|
||||
RequestHeader unset X-Forwarded-Host
|
||||
RequestHeader unset X-Forwarded-Proto
|
||||
RequestHeader unset X-Forwarded-Server
|
||||
RequestHeader unset X-Real-IP
|
||||
RequestHeader set X-Forwarded-For "127.0.0.1"
|
||||
# Modify response headers
|
||||
Header unset Set-Cookie
|
||||
|
||||
# Require SSO
|
||||
Include includes/freedombox-single-sign-on.conf
|
||||
<IfModule mod_auth_pubtkt.c>
|
||||
@ -24,6 +20,8 @@
|
||||
</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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user