Skip to content

Commit 9d8a1aa

Browse files
committed
Add HTML to list of static content files to Varnish VCL
1 parent 6ff4316 commit 9d8a1aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ sub vcl_recv {
6262
std.collect(req.http.Cookie);
6363

6464
# static files are always cacheable. remove SSL flag and cookie
65-
if (req.url ~ "^/(pub/)?(media|static)/.*\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$") {
65+
if (req.url ~ "^/(pub/)?(media|static)/.*\.(ico|html|css|js|jpg|jpeg|png|gif|tiff|bmp|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$") {
6666
unset req.http.Https;
6767
unset req.http./* {{ ssl_offloaded_header }} */;
6868
unset req.http.Cookie;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ sub vcl_recv {
7474
set req.url = regsuball(req.url,"&gclid=[^&]+",""); # strips when QS = "?foo=bar&gclid=AAA" or QS = "?foo=bar&gclid=AAA&bar=baz"
7575

7676
# static files are always cacheable. remove SSL flag and cookie
77-
if (req.url ~ "^/(pub/)?(media|static)/.*\.(ico|css|js|jpg|jpeg|png|gif|tiff|bmp|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$") {
77+
if (req.url ~ "^/(pub/)?(media|static)/.*\.(ico|html|css|js|jpg|jpeg|png|gif|tiff|bmp|mp3|ogg|svg|swf|woff|woff2|eot|ttf|otf)$") {
7878
unset req.http.Https;
7979
unset req.http./* {{ ssl_offloaded_header }} */;
8080
unset req.http.Cookie;

0 commit comments

Comments
 (0)