Settings moves to /settings with a 308 redirect from /account; domains, Status, Users, and user forms get matching browser titles and h1 text; backup page title reflects domain import. Co-Authored-By: Composer <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+11
-1
@@ -151,7 +151,8 @@ func (s *Server) Handler() http.Handler {
|
||||
authed.HandleFunc("POST /applications/{aid}/delete", h.HandleDeleteApplication)
|
||||
authed.HandleFunc("POST /reload", h.HandleReload)
|
||||
|
||||
authed.HandleFunc("/account", h.HandleAccount)
|
||||
authed.HandleFunc("/settings", h.HandleAccount)
|
||||
authed.HandleFunc("/account", redirectSettings)
|
||||
|
||||
authed.HandleFunc("GET /users", h.HandleUsers)
|
||||
authed.HandleFunc("GET /users/new", h.HandleUserNew)
|
||||
@@ -174,6 +175,15 @@ func (s *Server) Handler() http.Handler {
|
||||
return s.secure(mux)
|
||||
}
|
||||
|
||||
// redirectSettings sends legacy /account bookmarks to /settings (308 preserves POST).
|
||||
func redirectSettings(w http.ResponseWriter, r *http.Request) {
|
||||
target := "/settings"
|
||||
if r.URL.RawQuery != "" {
|
||||
target += "?" + r.URL.RawQuery
|
||||
}
|
||||
http.Redirect(w, r, target, http.StatusPermanentRedirect)
|
||||
}
|
||||
|
||||
func redirectHome(w http.ResponseWriter, r *http.Request) {
|
||||
p, ok := auth.PrincipalFromRequest(r)
|
||||
if ok && !p.IsGlobal() {
|
||||
|
||||
Reference in New Issue
Block a user