add Forwarded header
Some checks failed
Test Nix flake / Test nix flake (push) Has been cancelled

This commit is contained in:
XenGi 2026-09-07 23:31:29 +02:00
commit fdd6569d3f
Signed by: xengi
SSH key fingerprint: SHA256:dM+fLZGsDvyv6kunjE8bGduL24VsCFB4LEOSdmRHdG0
5 changed files with 33 additions and 0 deletions

View file

@ -83,11 +83,17 @@ in
basicAuthFile = config.age.secrets.grafana_basic_auth.path;
proxyPass = "http://unix:/run/grafana/grafana.sock";
recommendedProxySettings = true;
extraConfig = ''
proxy_set_header Forwarded "$proxy_forwarded_for_element;$proxy_forwarded_by_element;host=$host;proto=$scheme";
'';
};
"/api/live/" = {
proxyPass = "http://unix:/run/grafana/grafana.sock";
recommendedProxySettings = true;
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Forwarded "$proxy_forwarded_for_element;$proxy_forwarded_by_element;host=$host;proto=$scheme";
'';
};
};
};