Browse Source
Make sure the icons are displayed correctly in desktop clients (#5469)
pull/5477/head
Win8201Linux
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
1 deletions
-
src/util.rs
|
|
@ -55,7 +55,10 @@ impl Fairing for AppHeaders { |
|
|
|
res.set_raw_header("Referrer-Policy", "same-origin"); |
|
|
|
res.set_raw_header("X-Content-Type-Options", "nosniff"); |
|
|
|
res.set_raw_header("X-Robots-Tag", "noindex, nofollow"); |
|
|
|
res.set_raw_header("Cross-Origin-Resource-Policy", "same-origin"); |
|
|
|
|
|
|
|
if !res.headers().get_one("Content-Type").is_some_and(|v| v.starts_with("image/")) { |
|
|
|
res.set_raw_header("Cross-Origin-Resource-Policy", "same-origin"); |
|
|
|
} |
|
|
|
|
|
|
|
// Obsolete in modern browsers, unsafe (XS-Leak), and largely replaced by CSP
|
|
|
|
res.set_raw_header("X-XSS-Protection", "0"); |
|
|
|