We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ae761e3 + dcb3c67 commit 1e45a1eCopy full SHA for 1e45a1e
app/code/Magento/PageCache/etc/varnish.vcl
@@ -46,6 +46,18 @@ sub vcl_recv {
46
if (req.request != "GET" && req.request != "HEAD") {
47
return (pass);
48
}
49
+
50
+ # normalize url in case of leading HTTP scheme and domain
51
+ set req.url = regsub(req.url, "^http[s]?://[^/]+", "");
52
53
+ # collect all cookies
54
+ std.collect(req.http.Cookie);
55
56
+ # static files are always cacheable. remove SSL flag and cookie
57
+ if (req.url ~ "^/(pub/)?(media|static)/.*\.(png|jpg|jpeg|gif|css|js|swf|ico|woff|svg)$") {
58
+ unset req.http.Https;
59
+ unset req.http.Cookie;
60
+ }
61
62
set req.grace = 1m;
63
0 commit comments