Fix Cache-Control headers for files under img dir
The glob pattern did not work (probably issues with the negation).
RE2 (Google's high performance RegEx engine) does not support negation either, that's why it has to be expanded this way (negated character groups are supported).
Glob patterns are not matched against the leading slash, but regexes are (undocumented, but observed).
Relates to !43 and therefore ae3148337b
(the behavior finaly matches the description).
This commit is contained in:
parent
9342033393
commit
b0d578dbe4
@ -26,7 +26,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "!(img)/**/*.@(jpg|jpeg|png|webp)",
|
||||
"regex": "^/(?:[^i]|i[^m]|im[^g])[^/]*/.*[.](?:jpg|jpeg|png|webp)$",
|
||||
"headers": [
|
||||
{
|
||||
"key": "Cache-Control",
|
||||
|
Loading…
Reference in New Issue
Block a user