func (m MatchQuery) Match(r *http.Request) bool {
	repl := r.Context().Value(caddy.ReplacerCtxKey).(*caddy.Replacer)
	for param, vals := range m {
		param = repl.ReplaceAll(param, "")
		paramVal, found := r.URL.Query()[param]
		if found {
			for _, v := range vals {
				v = repl.ReplaceAll(v, "")
				if paramVal[0] == v || v == "*" {
					return true
				}
			}
		}
	}
	return len(m) == 0 && len(r.URL.Query()) == 0
}
// Match returns true if r matches m. An empty m matches an empty query string.
Match returns true if r matches m. An empty m matches an empty query string.
// Match returns true if r matches m . An empty m matches an empty query string .
func (m MatchQuery) Match(r *http.Request) bool {
	repl := r.Context().Value(caddy.ReplacerCtxKey).(*caddy.Replacer)
	for param, vals := range m {
		param = repl.ReplaceAll(param, "")
		paramVal, found := r.URL.Query()[param]
		if found {
			for _, v := range vals {
				v = repl.ReplaceAll(v, "")
				if paramVal[0] == v || v == "*" {
					return true
				}
			}
		}
	}
	return len(m) == 0 && len(r.URL.Query()) == 0
}
func ( m MatchQuery ) Match ( r * http . Request ) bool { repl := r . Context ( ) . Value ( caddy . ReplacerCtxKey ) . ( * caddy . Replacer ) for param , vals := range m { param = repl . ReplaceAll ( param , " " ) paramVal , found := r . URL . Query ( ) [ param ] if found { for _ , v := range vals { v = repl . ReplaceAll ( v , " " ) if paramVal [ 0 ] == v || v == " " { return true } } } } return len ( m ) == 0 && len ( r . URL . Query ( ) ) == 0 }
Match returns true if r matches m. An empty m matches an empty query string.
Match returns true if r matches m . An empty m matches an empty query string .