This commit is contained in:
Mateusz Gruszczyński
2026-09-16 16:56:13 +02:00
parent 143ff0d272
commit 1862fed87f
27 changed files with 1368 additions and 178 deletions
+5 -1
View File
@@ -24,7 +24,11 @@ async fn security_headers(request: Request, next: Next) -> Response {
);
headers.insert(
header::HeaderName::from_static("referrer-policy"),
HeaderValue::from_static("same-origin"),
HeaderValue::from_static(if path.starts_with("/charts/custom/") {
"no-referrer"
} else {
"same-origin"
}),
);
if is_html {