diff options
author | crystal <71373843+CrystalCommunication@users.noreply.github.com> | 2023-01-06 05:44:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 13:44:02 +0100 |
commit | d42b52fcfa4b175810e8da6bc1a8822838ff6456 (patch) | |
tree | 1d84d6ce9356a128ebbebcfa39395b4254d0228e /routers/web | |
parent | 3dbd2d942bc9a8609b242a64a9416fb82b564ffe (diff) | |
download | gitea-d42b52fcfa4b175810e8da6bc1a8822838ff6456.tar.gz gitea-d42b52fcfa4b175810e8da6bc1a8822838ff6456.zip |
make /{username}.png redirect to user/org avatar (#22356)
fix #22355
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers/web')
-rw-r--r-- | routers/web/web.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/web.go b/routers/web/web.go index 31b3eb9baa..997185974c 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -634,7 +634,7 @@ func RegisterRoutes(m *web.Route) { 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) }) + m.Get(".png", user.AvatarByUserName) m.Get(".keys", user.ShowSSHKeys) m.Get(".gpg", user.ShowGPGKeys) m.Get(".rss", feedEnabled, feed.ShowUserFeedRSS) |