You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# A valid discussion could be held on this line: do you really need to cache static files that don't cause load? Only if you have memory left.
130
149
# Sure, there's disk I/O, but chances are your OS will already have these files in their buffers (thus memory).
131
150
# Before you blindly enable this, have a read here: http://mattiasgeniar.be/2012/11/28/stop-caching-static-files/
132
-
# if (req.url ~ "^[^?]*\.(bmp|bz2|css|doc|eot|flv|gif|gz|ico|jpeg|jpg|js|less|mp[34]|pdf|png|rar|rtf|swf|tar|tgz|txt|wav|woff|xml|zip)(\?.*)?$") {
133
-
# unset req.http.Cookie;
134
-
# return (lookup);
135
-
# }
151
+
if (req.url~"^[^?]*\.(bmp|bz2|css|doc|eot|flv|gif|gz|ico|jpeg|jpg|js|less|mp[34]|pdf|png|rar|rtf|swf|tar|tgz|txt|wav|woff|xml|zip)(\?.*)?$") {
152
+
unsetreq.http.Cookie;
153
+
return (lookup);
154
+
}
136
155
137
156
# Send Surrogate-Capability headers to announce ESI support to backend
138
157
setreq.http.Surrogate-Capability="key=ESI/1.0";
@@ -226,9 +245,9 @@ sub vcl_fetch {
226
245
# Enable cache for all static files
227
246
# The same argument as the static caches from above: monitor your cache size, if you get data nuked out of it, consider giving up the static file cache.
228
247
# Before you blindly enable this, have a read here: http://mattiasgeniar.be/2012/11/28/stop-caching-static-files/
229
-
# if (req.url ~ "^[^?]*\.(bmp|bz2|css|doc|eot|flv|gif|gz|ico|jpeg|jpg|js|less|mp[34]|pdf|png|rar|rtf|swf|tar|tgz|txt|wav|woff|xml|zip)(\?.*)?$") {
230
-
# unset beresp.http.set-cookie;
231
-
# }
248
+
if (req.url~"^[^?]*\.(bmp|bz2|css|doc|eot|flv|gif|gz|ico|jpeg|jpg|js|less|mp[34]|pdf|png|rar|rtf|swf|tar|tgz|txt|wav|woff|xml|zip)(\?.*)?$") {
249
+
unsetberesp.http.set-cookie;
250
+
}
232
251
233
252
# Sometimes, a 301 or 302 redirect formed via Apache's mod_rewrite can mess with the HTTP port that is being passed along.
234
253
# This often happens with simple rewrite rules in a scenario where Varnish runs on :80 and Apache on :8080 on the same box.
0 commit comments