Skip to content

Commit

Permalink
Redirect to browser only if browser is enabled (minio#7914)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana authored and kannappanr committed Jul 15, 2019
1 parent bce3f82 commit 04a152b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/api-response.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04a152b

Please sign in to comment.