From 04db88723f1bb57c605af9591ec3893addc02772 Mon Sep 17 00:00:00 2001 From: simonzhangsz Date: Wed, 13 Sep 2023 21:18:25 +0800 Subject: [PATCH] d --- lib/services/services.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/services/services.go b/lib/services/services.go index b80db4c3..5d2d9dc5 100644 --- a/lib/services/services.go +++ b/lib/services/services.go @@ -678,7 +678,11 @@ func ResponseForbidden403MultiLoginNotAllowed(w http.ResponseWriter) { } func ResponseNotFound404UriNotExist(w http.ResponseWriter, r *http.Request) { - log.Errorf("r.Method:%s, r.URL:%s", r.Method, r.URL) + if r.Method == "OPTIONS" { + ResponseStatusOK204NoContent(w) + return + } + //log.Errorf("r.Method:%s, r.URL:%s", r.Method, r.URL) errorMessage := ErrorMessage{"1", "the requested URI does not exist"} errorResponse := ErrorResponse{errorMessage} ResponseWithJson(w, http.StatusNotFound, errorResponse)