func()

in proxy/lib/proxy/proxy.go [412:420]


func (s *Service) verifyRequestPath(r *http.Request) error {
	// TODO: consider use trie to improve the performance.
	for _, prefix := range s.opts.AllowedPathPrefix {
		if strings.HasPrefix(r.URL.Path, prefix) {
			return nil
		}
	}
	return status.Errorf(codes.NotFound, "path %q not found", r.URL.Path)
}