mattermost: add recommended proxy settings

This unbreaks the keycloak login
keep-around/2d0a5b9c22531f2fff7688a37df037e61a1622c0
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
1 changed files with 13 additions and 0 deletions

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;