diff options
author | mscherer <mscherer@users.noreply.github.com> | 2021-11-26 15:55:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 22:55:11 +0800 |
commit | 1f0dab21169104941503747b2124cb6321259344 (patch) | |
tree | 55857513db1deea01e08b85031d5e8545b42d425 /routers/web/web.go | |
parent | fcc11253ac34bdee98dce8a5dae74d5bf483fa6e (diff) | |
download | gitea-1f0dab21169104941503747b2124cb6321259344.tar.gz gitea-1f0dab21169104941503747b2124cb6321259344.zip |
Implement Well-Known URL for password change (#17777)
* Implement Well-Known URL for password change
Fixes #11804
Diffstat (limited to 'routers/web/web.go')
-rw-r--r-- | routers/web/web.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/routers/web/web.go b/routers/web/web.go index ebced6942f..a642fdea5e 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -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") |