Skip to content

Commit 1f0dab2

Browse files
authored
Implement Well-Known URL for password change (#17777)
* Implement Well-Known URL for password change Fixes #11804
1 parent fcc1125 commit 1f0dab2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

routers/web/web.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,16 @@ func RegisterRoutes(m *web.Route) {
232232
// Routers.
233233
// for health check
234234
m.Get("/", Home)
235-
m.Get("/.well-known/openid-configuration", user.OIDCWellKnown)
236-
if setting.Federation.Enabled {
237-
m.Get("/.well-known/nodeinfo", NodeInfoLinks)
238-
}
235+
m.Group("/.well-known", func() {
236+
m.Get("/openid-configuration", user.OIDCWellKnown)
237+
if setting.Federation.Enabled {
238+
m.Get("/nodeinfo", NodeInfoLinks)
239+
}
240+
m.Get("/change-password", func(w http.ResponseWriter, req *http.Request) {
241+
http.Redirect(w, req, "/user/settings/account", http.StatusTemporaryRedirect)
242+
})
243+
})
244+
239245
m.Group("/explore", func() {
240246
m.Get("", func(ctx *context.Context) {
241247
ctx.Redirect(setting.AppSubURL + "/explore/repos")

0 commit comments

Comments
 (0)