Skip to content

Commit d42b52f

Browse files
make /{username}.png redirect to user/org avatar (#22356)
fix #22355 Co-authored-by: Lunny Xiao <[email protected]>
1 parent 3dbd2d9 commit d42b52f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/web.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ func RegisterRoutes(m *web.Route) {
634634
http.ServeFile(ctx.Resp, ctx.Req, path.Join(setting.StaticRootPath, "public/img/favicon.png"))
635635
})
636636
m.Group("/{username}", func() {
637-
m.Get(".png", func(ctx *context.Context) { ctx.Error(http.StatusNotFound) })
637+
m.Get(".png", user.AvatarByUserName)
638638
m.Get(".keys", user.ShowSSHKeys)
639639
m.Get(".gpg", user.ShowGPGKeys)
640640
m.Get(".rss", feedEnabled, feed.ShowUserFeedRSS)

0 commit comments

Comments
 (0)