use SVG for /favicon.ico if browser asks for it

This makes Chromium use the SVG favicon universally including as the
favicon for non-HTML files.
This commit is contained in:
Daniel Micay
2021-05-17 10:02:00 -04:00
parent 14f38d1b8e
commit cf9bc8d45f
22 changed files with 24 additions and 21 deletions

View File

@@ -215,6 +215,9 @@ http {
}
location = /favicon.ico {
if ($http_accept ~ "image/svg\+xml") {
rewrite ^ /favicon.svg last;
}
include snippets/security-headers.conf;
# avoid breaking image hotlinking such as https://github.com/TryGhost/Ghost/issues/12880
add_header Cross-Origin-Resource-Policy "cross-origin" always;