mirror of
https://github.com/RGBCube/ncc
synced 2025-07-27 18:17:44 +00:00
fix: fix grafana headers
This commit is contained in:
parent
f3e93ee63e
commit
d1dc2a3984
2 changed files with 7 additions and 8 deletions
|
@ -69,14 +69,13 @@ in {
|
|||
};
|
||||
|
||||
services.nginx.virtualHosts.${fqdn} = merge config.services.nginx.sslTemplate {
|
||||
locations."/" = {
|
||||
extraConfig = /* nginx */ ''
|
||||
# Grafana sets `nosniff` while not setting the content type properly,
|
||||
# so everything breaks with it. Unset the header.
|
||||
${config.services.nginx.headers}
|
||||
add_header X-Content-Type-Options "" always;
|
||||
proxy_hide_header X-Content-Type-Options;
|
||||
'';
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://[::1]:${toString port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@ in {
|
|||
|
||||
add_header Strict-Transport-Security $hsts_header always;
|
||||
|
||||
add_header Content-Security-Policy "script-src 'self' 'unsafe-inline'; object-src 'none'; base-uri 'none';" always;
|
||||
add_header Content-Security-Policy "script-src 'self' 'unsafe-inline'; object-src 'self'; base-uri 'self';" always;
|
||||
|
||||
add_header Referrer-Policy no-referrer always;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue