Skip to content

Commit

Permalink
cluster/http: redirect / to /status
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Feb 25, 2024
1 parent eb3fdaa commit d9c6bf1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/cluster/http/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
switch {
case r.URL.Path == "/" || r.URL.Path == "":
http.Redirect(w, r, "/status", http.StatusFound)
case strings.HasPrefix(r.URL.Path, "/api/v1/stats/realtime/visitors"):
s.handleRealtime(w, r, params)
case strings.HasPrefix(r.URL.Path, "/api/v1/stats/aggregate"):
Expand Down

0 comments on commit d9c6bf1

Please sign in to comment.