@@ -51,11 +51,7 @@ sub vcl_recv {
51
51
# collect all cookies
52
52
std.collect (req.http.Cookie );
53
53
54
- # Even though there are few possible values for Accept-Encoding, Varnish treats
55
- # them literally rather than semantically, so even a small difference which makes
56
- # no difference to the backend can reduce cache efficiency by making Varnish cache
57
- # too many different versions of an object.
58
- # https://www.varnish-cache.org/trac/wiki/FAQ/Compression
54
+ # Compression filter. See https://www.varnish-cache.org/trac/wiki/FAQ/Compression
59
55
if (req.http.Accept-Encoding ) {
60
56
if (req.url ~ " \.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv)$" ) {
61
57
# No point in compressing these
@@ -89,17 +85,14 @@ sub vcl_hash {
89
85
hash_data (regsub (req.http.cookie , " ^.*?X-Magento-Vary=([^;]+);*.*$" , " \1" ));
90
86
}
91
87
92
- #for multi site configurations to not cache each- other's content
88
+ # For multi site configurations to not cache each other's content
93
89
if (req.http.host ) {
94
90
hash_data (req.http.host );
95
91
} else {
96
92
hash_data (server.ip );
97
93
}
98
94
99
- # mainly to make sure, if the site was cached via a http connection and a visitor opens the
100
- # https version, they won't see an ssl warning about mixed content (if the site was cached via http
101
- # connection, the external resources like css, js will be opened via an http connection as well
102
- # instead of https
95
+ # To make sure http users don't see ssl warning
103
96
if (req.http.X-Forwarded-Proto ) {
104
97
hash_data (req.http.X-Forwarded-Proto );
105
98
}
0 commit comments