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:
+1
-1
@@ -26,7 +26,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "!(img)/**/*.@(jpg|jpeg|png|webp)",
|
"regex": "^/(?:[^i]|i[^m]|im[^g])[^/]*/.*[.](?:jpg|jpeg|png|webp)$",
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
"key": "Cache-Control",
|
"key": "Cache-Control",
|
||||||
|
|||||||
Reference in New Issue
Block a user