MCPcopy Create free account
hub / github.com/CPChain/chain / newVHostHandler

Function newVHostHandler

api/rpc/http.go:273–279  ·  view source on GitHub ↗
(vhosts []string, next http.Handler)

Source from the content-addressed store, hash-verified

271}
272
273func newVHostHandler(vhosts []string, next http.Handler) http.Handler {
274 vhostMap := make(map[string]struct{})
275 for _, allowedHost := range vhosts {
276 vhostMap[strings.ToLower(allowedHost)] = struct{}{}
277 }
278 return &virtualHostHandler{vhostMap, next}
279}

Callers 1

NewHTTPServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected