Skip to content

Commit ed629c5

Browse files
committed
Refactor the routes in a /.well-known group
1 parent 674e7d5 commit ed629c5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

routers/web/web.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,14 @@ 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-
}
239-
m.Get("/.well-known/change-password", func(w http.ResponseWriter, req *http.Request) {
240-
http.Redirect(w, req, "/user/settings/account", http.StatusTemporaryRedirect)
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+
})
241243
})
242244

243245
m.Group("/explore", func() {

0 commit comments

Comments
 (0)