MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / matchHiddenDomain

Function matchHiddenDomain

auth/common.go:15–21  ·  view source on GitHub ↗
(host, hidden_domain string)

Source from the content-addressed store, hash-verified

13)
14
15func matchHiddenDomain(host, hidden_domain string) bool {
16 if h, _, err := net.SplitHostPort(host); err == nil {
17 host = h
18 }
19 host = strings.ToLower(host)
20 return subtle.ConstantTimeCompare([]byte(host), []byte(hidden_domain)) == 1
21}
22
23func requireBasicAuth(ctx context.Context, wr http.ResponseWriter, req *http.Request, hidden_domain string, next Auth) (string, bool) {
24 if hidden_domain != "" {

Callers 5

ValidateMethod · 0.85
ValidateMethod · 0.85
requireBasicAuthFunction · 0.85
ValidateMethod · 0.85
ValidateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected