export function policyPathMatch()

in src/policy.ts [51:57]


export function policyPathMatch(policy: FirewallPolicy, req: EdgeRequest): boolean {
  const url = new URL(req.url);
  if (!policy.path) {
    return true;
  }
  return picomatch.isMatch(url.pathname, policy.path);
}