mattermost: add recommended proxy settings

This unbreaks the keycloak login
This commit is contained in:
stuebinm 2021-07-18 21:24:25 +02:00
parent 32e13edee1
commit 20bafd66c5
No known key found for this signature in database
GPG key ID: 8FBE8AAD32FA12B7

View file

@ -204,6 +204,19 @@
locations."/" = {
proxyPass = "http://${config.containers.mattermost.localAddress}:3000";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
# Mattermost CSR Patch
proxy_hide_header Content-Security-Policy;
proxy_hide_header X-Frame-Options;
proxy_redirect off;
'';
};
forceSSL = true;
enableACME = true;