mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	make /{username}.png redirect to user/org avatar (#22356)
fix #22355 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user