(host, hidden_domain string)
| 13 | ) |
| 14 | |
| 15 | func 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 | |
| 23 | func requireBasicAuth(ctx context.Context, wr http.ResponseWriter, req *http.Request, hidden_domain string, next Auth) (string, bool) { |
| 24 | if hidden_domain != "" { |
no outgoing calls
no test coverage detected