apache / trafficcontrol

Apache Traffic Control is an Open Source implementation of a Content Delivery Network
https://trafficcontrol.apache.org/
Apache License 2.0
1.03k stars 339 forks source link

Add a glob blox + advanced/pcre box for invalidations #5936

Open ezelkow1 opened 3 years ago

ezelkow1 commented 3 years ago

I'm submitting a ...

Traffic Control components affected ...

Current behavior:

The current behavior is to only take a regex. This can be confusing for the average user who does not know regex syntax and usage.

New behavior:

Most users are familiar with using globs which also account for the majority of invalidations. I believe defaulting to presenting a glob box (with then a supplemental/show-able advanced box that can take a real regex) would help with usability as well as more correct invalidation requests

Minimal reproduction of the problem with instructions:

Anything else:

rob05c commented 3 years ago

Some notes: by "glob," we mean * as a wildcard. So, this will need to:

  1. escape all special characters in PCRE Regex with \ (except *)
  2. then replace any * with the PCRE .*.

Also, * is a valid URL character. So this will need to also allow users to use ** to indicate a literal * in the URL. So: