сleanup (#24)
* move out prometheus metrics * not use gorilla wrappers Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -5,12 +5,9 @@ import (
|
||||
"crypto/tls"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"github.com/gorilla/handlers"
|
||||
"github.com/unistack-org/micro/v3/api/server"
|
||||
"github.com/unistack-org/micro/v3/api/server/cors"
|
||||
"github.com/unistack-org/micro/v3/logger"
|
||||
)
|
||||
|
||||
@@ -58,14 +55,6 @@ func (s *httpServer) Handle(path string, handler http.Handler) {
|
||||
handler = wrapper(handler)
|
||||
}
|
||||
|
||||
// wrap with cors
|
||||
if s.opts.EnableCORS {
|
||||
handler = cors.CombinedCORSHandler(handler)
|
||||
}
|
||||
|
||||
// wrap with logger
|
||||
handler = handlers.CombinedLoggingHandler(os.Stdout, handler)
|
||||
|
||||
s.mux.Handle(path, handler)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user