diff --git a/cmd/api-response.go b/cmd/api-response.go index 4e1c775cb..d0964ff70 100644 --- a/cmd/api-response.go +++ b/cmd/api-response.go @@ -582,7 +582,7 @@ func writeErrorResponse(ctx context.Context, w http.ResponseWriter, err APIError case "AccessDenied": // The request is from browser and also if browser // is enabled we need to redirect. - if browser { + if browser && globalIsBrowserEnabled { w.Header().Set(xhttp.Location, minioReservedBucketPath+reqURL.Path) w.WriteHeader(http.StatusTemporaryRedirect) return