Skip to content

Commit

Permalink
Refactor the routes in a /.well-known group
Browse files Browse the repository at this point in the history
  • Loading branch information
mscherer committed Nov 26, 2021
1 parent 674e7d5 commit ed629c5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions routers/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,14 @@ 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.Get("/.well-known/change-password", func(w http.ResponseWriter, req *http.Request) {
http.Redirect(w, req, "/user/settings/account", http.StatusTemporaryRedirect)
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() {
Expand Down

0 comments on commit ed629c5

Please sign in to comment.