mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-15 17:49:20 +08:00
Redirect `/favicon.ico` to `/assets/img/favicon.png`. Fix #19109 Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
ee234aff61
commit
1aa5dc75df
@ -98,6 +98,11 @@ func Routes(sessioner func(http.Handler) http.Handler) *web.Route {
|
|||||||
http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "/assets/img/apple-touch-icon.png"), 301)
|
http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "/assets/img/apple-touch-icon.png"), 301)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// redirect default favicon to the path of the custom favicon with a default as a fallback
|
||||||
|
routes.Get("/favicon.ico", func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "/assets/img/favicon.png"), 301)
|
||||||
|
})
|
||||||
|
|
||||||
common := []interface{}{}
|
common := []interface{}{}
|
||||||
|
|
||||||
if setting.EnableGzip {
|
if setting.EnableGzip {
|
||||||
|
Loading…
Reference in New Issue
Block a user