[#455] Allow preflight requests without auth

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
Marina Biryukova 2025-03-20 14:04:27 +03:00
parent c9c7379835
commit 8625b6e119
3 changed files with 31 additions and 3 deletions

View file

@ -518,9 +518,13 @@ func (h *handlerMock) ListBucketsHandler(w http.ResponseWriter, r *http.Request)
h.writeResponse(w, res)
}
func (h *handlerMock) Preflight(http.ResponseWriter, *http.Request) {
//TODO implement me
panic("implement me")
func (h *handlerMock) Preflight(w http.ResponseWriter, r *http.Request) {
res := &handlerResult{
Method: middleware.OptionsBucketOperation,
ReqInfo: middleware.GetReqInfo(r.Context()),
}
h.writeResponse(w, res)
}
func (h *handlerMock) AppendCORSHeaders(http.ResponseWriter, *http.Request) {