Skip to content

Commit 843c832

Browse files
committed
Added comments to VCL template files describing the purpose / use of the X-Pool header
1 parent 7bd8126 commit 843c832

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app/code/Magento/PageCache/etc/varnish4.vcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ sub vcl_recv {
2626
if (client.ip !~ purge) {
2727
return (synth(405, "Method not allowed"));
2828
}
29+
# To use the X-Pool header for purging varnish during automated deployments, make sure the X-Pool header
30+
# has been added to the response in your backend server config. This is used, for example, by the
31+
# capistrano-magento2 gem for purging old content from varnish during it's deploy routine.
2932
if (!req.http.X-Magento-Tags-Pattern && !req.http.X-Pool) {
3033
return (synth(400, "X-Magento-Tags-Pattern or X-Pool header required"));
3134
}

app/code/Magento/PageCache/etc/varnish5.vcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ sub vcl_recv {
2727
if (client.ip !~ purge) {
2828
return (synth(405, "Method not allowed"));
2929
}
30+
# To use the X-Pool header for purging varnish during automated deployments, make sure the X-Pool header
31+
# has been added to the response in your backend server config. This is used, for example, by the
32+
# capistrano-magento2 gem for purging old content from varnish during it's deploy routine.
3033
if (!req.http.X-Magento-Tags-Pattern && !req.http.X-Pool) {
3134
return (synth(400, "X-Magento-Tags-Pattern or X-Pool header required"));
3235
}

0 commit comments

Comments
 (0)