Skip to content

Commit 1a4e4a2

Browse files
author
Oleksandr Gorkun
committed
Merge branches '2.2.2-develop-PR' and 'MAGETWO-83152' of https://github.com/magento-qwerty/magento2ce into 2.2.2-develop-PR
# Conflicts: # app/code/Magento/PageCache/etc/varnish4.vcl # app/code/Magento/PageCache/etc/varnish5.vcl
2 parents 3788f82 + 5d1c796 commit 1a4e4a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ sub vcl_deliver {
189189
}
190190

191191
# Not letting browser to cache non-static files.
192-
if (req.url !~ "^/(pub/)?(media|static)/") {
192+
if (resp.http.Cache-Control !~ "private" && req.url !~ "^/(pub/)?(media|static)/") {
193193
set resp.http.Pragma = "no-cache";
194194
set resp.http.Expires = "-1";
195195
set resp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ sub vcl_deliver {
190190
}
191191

192192
# Not letting browser to cache non-static files.
193-
if (req.url !~ "^/(pub/)?(media|static)/") {
193+
if (resp.http.Cache-Control !~ "private" && req.url !~ "^/(pub/)?(media|static)/") {
194194
set resp.http.Pragma = "no-cache";
195195
set resp.http.Expires = "-1";
196196
set resp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";

0 commit comments

Comments
 (0)