From 5389f95e2fe9869429a4300e7968f2ad05b6f2ac Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 9 May 2021 22:03:09 +0200 Subject: [PATCH] Fix incorrect asset URL (#15805) Fixes another regression from https://github.com/go-gitea/gitea/pull/15219. --- modules/templates/helper.go | 2 +- routers/routes/web.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/templates/helper.go b/modules/templates/helper.go index fed15d67d69f8..9922cfb225f95 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -766,7 +766,7 @@ func ReactionToEmoji(reaction string) template.HTML { if val != nil { return template.HTML(val.Emoji) } - return template.HTML(fmt.Sprintf(`:%s:`, reaction, setting.StaticURLPrefix, reaction)) + return template.HTML(fmt.Sprintf(`:%s:`, reaction, setting.StaticURLPrefix, reaction)) } // RenderNote renders the contents of a git-notes file as a commit message. diff --git a/routers/routes/web.go b/routers/routes/web.go index c4d0bc32f87c7..77ceb8321419d 100644 --- a/routers/routes/web.go +++ b/routers/routes/web.go @@ -173,7 +173,7 @@ func WebRoutes() *web.Route { // this png is very likely to always be below the limit for gzip so it doesn't need to pass through gzip routes.Get("/apple-touch-icon.png", func(w http.ResponseWriter, req *http.Request) { - http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "img/apple-touch-icon.png"), 301) + http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "/assets/img/apple-touch-icon.png"), 301) }) gob.Register(&u2f.Challenge{})