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

Method wrapHeaders

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

Source from the content-addressed store, hash-verified

16}
17
18func (server *Server) wrapHeaders(handler http.Handler) http.Handler {
19 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
20 // todo add version
21 w.Header().Set("Server", "GoTTY")
22 handler.ServeHTTP(w, r)
23 })
24}
25
26func (server *Server) wrapBasicAuth(handler http.Handler, credential string) http.Handler {
27 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Callers 1

setupHandlersMethod · 0.95

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected