v0.14.15
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user