Skip to content

Commit c99d56b

Browse files
committed
Reset cache control headers only on content that contains X-Magento-Tags.
Otherwise we run the risk of unsetting Cache-Control headers of objects we didn't intend.
1 parent 357fe1f commit c99d56b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: etc/vcl_snippets/deliver.vcl

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# Send no cache headers to end users for non-static content. Also make sure
2-
# we only set this on the edge nodes and not on shields
3-
if (req.url !~ "^/(pub/)?(media|static)/.*" && !req.http.Fastly-FF ) {
1+
# Send no cache headers to end users for non-static content created by Magento
2+
if (resp.http.X-Magento-Tags && !req.http.Fastly-FF ) {
43
set resp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";
54
}
65

0 commit comments

Comments
 (0)