update at 2023/08/14
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user