v0.14.15-fix

This commit is contained in:
Mateusz Gruszczyński
2026-09-16 17:07:17 +02:00
parent 1862fed87f
commit c7d47db64e
26 changed files with 324 additions and 377 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ async fn security_headers(request: Request, next: Next) -> Response {
let path = request.uri().path();
let is_api = path == "/api" || path.starts_with("/api/");
let is_api_docs = path == "/api-docs" || path.starts_with("/api-docs/");
let is_custom_chart = path.starts_with("/charts/custom/");
let mut response = next.run(request).await;
@@ -24,7 +25,7 @@ async fn security_headers(request: Request, next: Next) -> Response {
);
headers.insert(
header::HeaderName::from_static("referrer-policy"),
HeaderValue::from_static(if path.starts_with("/charts/custom/") {
HeaderValue::from_static(if is_custom_chart {
"no-referrer"
} else {
"same-origin"