update at 2023/08/14

This commit is contained in:
2023-08-14 21:41:37 +08:00
parent a039a664f1
commit 44e8cbee2c
255 changed files with 20426 additions and 233 deletions

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)
})
}