mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Implement Well-Known URL for password change (#17777)
* Implement Well-Known URL for password change Fixes #11804
This commit is contained in:
		@@ -232,10 +232,16 @@ func RegisterRoutes(m *web.Route) {
 | 
			
		||||
	// Routers.
 | 
			
		||||
	// for health check
 | 
			
		||||
	m.Get("/", Home)
 | 
			
		||||
	m.Get("/.well-known/openid-configuration", user.OIDCWellKnown)
 | 
			
		||||
	if setting.Federation.Enabled {
 | 
			
		||||
		m.Get("/.well-known/nodeinfo", NodeInfoLinks)
 | 
			
		||||
	}
 | 
			
		||||
	m.Group("/.well-known", func() {
 | 
			
		||||
		m.Get("/openid-configuration", user.OIDCWellKnown)
 | 
			
		||||
		if setting.Federation.Enabled {
 | 
			
		||||
			m.Get("/nodeinfo", NodeInfoLinks)
 | 
			
		||||
		}
 | 
			
		||||
		m.Get("/change-password", func(w http.ResponseWriter, req *http.Request) {
 | 
			
		||||
			http.Redirect(w, req, "/user/settings/account", http.StatusTemporaryRedirect)
 | 
			
		||||
		})
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	m.Group("/explore", func() {
 | 
			
		||||
		m.Get("", func(ctx *context.Context) {
 | 
			
		||||
			ctx.Redirect(setting.AppSubURL + "/explore/repos")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user