mailsystem: rspamd: Ensure proxy headers for webui are configured

This commit is contained in:
Thomas Preisner 2024-12-28 20:20:02 +01:00
parent 35aeb19b24
commit 1b26a41aaf

View file

@ -120,6 +120,10 @@ in {
locations."/rspamd" = {
proxyPass = "http://unix:${rspamdControllerSocket}:/";
basicAuthFile = cfg.rspamd.webUi.basicAuthFile;
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
'';
};
sslCertificate = lib.mkIf (cfg.certificateScheme == "selfsigned") sslCertPath;
sslCertificateKey = lib.mkIf (cfg.certificateScheme == "selfsigned") sslKeyPath;