Skip to content

Commit

Permalink
Make sure the icons are displayed correctly in desktop clients (#5469)
Browse files Browse the repository at this point in the history
  • Loading branch information
WinLinux1028 authored Jan 27, 2025
1 parent 2c54998 commit 1b46c80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 1b46c80

Please sign in to comment.