From 71d5a090df0649b1782f25319063c831efda332a Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 23 Feb 2020 15:34:53 +0100 Subject: Prevent Firefox from using apple-touch-icon (#10402) * Prevent Firefox from using apple-touch-icon The opaque background does not work well in Firefox which uses the icon as a "rich icon". Prevent this by not specifying it in HTML. Real Apple devices will still request the icon on the static path. Fixes: https://github.com/go-gitea/gitea/issues/10394 Also adjust gitignore so app.ini.sample becomes searchable and fixed a variable name in app.ini.sample. * fix gitignore --- routers/routes/routes.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'routers') diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 679152c0ed..525115fb95 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -1002,6 +1002,10 @@ func RegisterRoutes(m *macaron.Macaron) { } }) + m.Get("/apple-touch-icon.png", func(ctx *context.Context) { + ctx.Redirect(path.Join(setting.StaticURLPrefix, "img/apple-touch-icon.png"), 301) + }) + // Progressive Web App m.Get("/manifest.json", templates.JSONRenderer(), func(ctx *context.Context) { ctx.HTML(200, "pwa/manifest_json") -- cgit v1.2.3