nginx fixes

This commit is contained in:
Danilo Reyes
2026-02-06 08:27:58 -06:00
parent 41298f0980
commit 6d5422f447
2 changed files with 12 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
}:
let
cfg = config.my.websites.lidarrMbReport;
mbHeaders = ''
mbSecurityHeaders = ''
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
'';
@@ -23,20 +23,22 @@ in
"/" = {
extraConfig = ''
try_files $uri /missing_albums.html;
${mbSecurityHeaders}
'';
};
"~* \\.html$" = {
extraConfig = ''
add_header Content-Type "text/html; charset=utf-8";
${mbSecurityHeaders}
'';
};
"~* \\.json$" = {
extraConfig = ''
add_header Content-Type "application/json";
${mbSecurityHeaders}
'';
};
};
extraConfig = mbHeaders;
};
};
}