Skip to content

Commit

Permalink
Implement Well-Known URL for password change (#17777)
Browse files Browse the repository at this point in the history
* Implement Well-Known URL for password change

Fixes #11804
  • Loading branch information
mscherer committed Nov 26, 2021
1 parent fcc1125 commit 1f0dab2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions routers/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1f0dab2

Please sign in to comment.