fix: handle unsupported APIs more granularly (#11674)

This commit is contained in:
Ritesh H Shukla
2021-03-30 23:19:36 -07:00
committed by GitHub
parent 8e6e287729
commit 3ddd8b04d1
7 changed files with 285 additions and 211 deletions

View File

@@ -28,6 +28,7 @@ import (
"net/http"
"strconv"
"strings"
"sync/atomic"
"time"
xhttp "github.com/minio/minio/cmd/http"
@@ -505,6 +506,7 @@ func setAuthHandler(h http.Handler) http.Handler {
return
}
writeErrorResponse(r.Context(), w, errorCodes.ToAPIErr(ErrSignatureVersionNotSupported), r.URL, guessIsBrowserReq(r))
atomic.AddUint64(&globalHTTPStats.rejectedRequestsAuth, 1)
})
}