сleanup (#24)

* move out prometheus metrics
* not use gorilla wrappers

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-08-25 17:59:41 +03:00
committed by GitHub
parent ef773d8d49
commit 36c53b4917
9 changed files with 2 additions and 396 deletions

View File

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