MCPcopy
hub / github.com/1Panel-dev/KubePi / wrapLogger

Method wrapLogger

thirdparty/gotty/server/middleware.go:10–16  ·  view source on GitHub ↗
(handler http.Handler)

Source from the content-addressed store, hash-verified

8)
9
10func (server *Server) wrapLogger(handler http.Handler) http.Handler {
11 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
12 rw := &logResponseWriter{w, 200}
13 handler.ServeHTTP(rw, r)
14 //log.Printf("%s %d %s %s", r.RemoteAddr, rw.status, r.Method, r.URL.Path)
15 })
16}
17
18func (server *Server) wrapHeaders(handler http.Handler) http.Handler {
19 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Callers 1

setupHandlersMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected