diff --git a/cmd/generic-handlers.go b/cmd/generic-handlers.go index b55e99fa8..3e1625c8d 100644 --- a/cmd/generic-handlers.go +++ b/cmd/generic-handlers.go @@ -153,7 +153,7 @@ func setBrowserRedirectMiddleware(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { read := r.Method == http.MethodGet || r.Method == http.MethodHead // Re-direction is handled specifically for browser requests. - if guessIsBrowserReq(r) && read && globalBrowserRedirect { + if !guessIsHealthCheckReq(r) && guessIsBrowserReq(r) && read && globalBrowserRedirect { // Fetch the redirect location if any. if u := getRedirectLocation(r); u != nil { // Employ a temporary re-direct.