mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
07b4fb4c70
Config rule has/missing conditions used unanchored regex matching,
so a condition like has:[cookie:role=admin] would match cookie values
containing 'admin' as a substring (e.g. 'not-admin', 'admin-temp').
Anchor the regex with ^ and $ to match the full value, matching
Next.js behavior (prepare-destination.ts uses new RegExp(`^${value}$`)).
Adds tests verifying exact match, substring rejection, superstring
rejection, and regex pattern compatibility with anchoring.