mirror of
https://gitee.com/gitea/gitea
synced 2025-12-02 14:20:28 +08:00
Backport of #21833 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
@@ -597,7 +597,10 @@ func RegisterRoutes(m *web.Route) {
|
||||
|
||||
m.Group("", func() {
|
||||
m.Get("/favicon.ico", func(ctx *context.Context) {
|
||||
ctx.ServeFile(path.Join(setting.StaticRootPath, "public/img/favicon.png"))
|
||||
ctx.SetServeHeaders(&context.ServeHeaderOptions{
|
||||
Filename: "favicon.png",
|
||||
})
|
||||
http.ServeFile(ctx.Resp, ctx.Req, path.Join(setting.StaticRootPath, "public/img/favicon.png"))
|
||||
})
|
||||
m.Group("/{username}", func() {
|
||||
m.Get(".png", func(ctx *context.Context) { ctx.Error(http.StatusNotFound) })
|
||||
|
||||
Reference in New Issue
Block a user