update at 2023/08/14

This commit is contained in:
simonzhangsz committed 2023-08-14 21:41:37 +08:00
1 parent a039a664f1
commit 44e8cbee2c
255 files changed
+20426 -233

No files matched your search

+5
View File
@@ -4,6 +4,7 @@ import (
"net/http"
"ems.agt/lib/log"
"ems.agt/lib/services"
)
func LoggerTraceMiddleware(next http.Handler) http.Handler {
@@ -25,6 +26,10 @@ func LoggerTraceMiddleware(next http.Handler) http.Handler {
//r.Body = ioutil.NopCloser(bytes.NewReader(body))
//log.Trace("Body:", string(body))
// Call the next handler, which can be another middleware in the chain, or the final handler.
if r.Method == "OPTIONS" {
services.ResponseStatusOK201Accepted(w)
return
}
next.ServeHTTP(w, r)
})
}