MCPcopy Create free account
hub / github.com/doorbash/pm2-web / middleware

Method middleware

server.go:92–98  ·  view source on GitHub ↗
(f http.HandlerFunc)

Source from the content-addressed store, hash-verified

90}
91
92func (h *HttpServer) middleware(f http.HandlerFunc) http.Handler {
93 if h.options.Username == "" {
94 return f
95 } else {
96 return httpauth.SimpleBasicAuth(h.options.Username, h.options.Password)(f)
97 }
98}
99
100func NewHTTPServer(
101 addr string,

Callers 1

NewHTTPServerFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected