Redirect HTML service requests for favicon.ico

... to a real favicon
pull/114/head
Thomas Buckley-Houston 2018-07-11 16:46:33 +08:00
rodzic 85affab04d
commit be098c0673
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -90,6 +90,10 @@ func handleHTTPServerRequest(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "https://" + r.Host + "/" + urlForBrowsh, 301)
return
}
if urlForBrowsh == "favicon.ico" {
http.Redirect(w, r, "https://www.brow.sh/assets/favicon-16x16.png", 301)
return
}
w.Header().Set("Cache-Control", "public, max-age=600")
if (isDisallowedURL(urlForBrowsh)) {
http.Redirect(w, r, "/", 301)