18
0
Fork 0

amélioration

This commit is contained in:
gcolpart 2016-10-31 02:40:13 +01:00
parent fa55a55648
commit 7d30147882
1 changed files with 12 additions and 9 deletions

View File

@ -339,15 +339,7 @@ Le temps de mise en cache par défaut peut être défini avec l'option `-t` à [
sub vcl_backend_response {
set beresp.ttl = 1800s;
#unset beresp.http.expires;
set beresp.http.cache-control = "max-age=1800";
set beresp.http.magicmarker = "1";
}
sub vcl_deliver {
if (resp.http.magicmarker) {
unset resp.http.magicmarker;
set resp.http.age = "0";
}
set beresp.http.Cache-Control = "max-age=1800";
}
~~~
@ -362,6 +354,17 @@ sub vcl_recv {
if (req.http.Cookie ~ "(VARNISH|DRUPAL_UID)") {
return (pass);
}
if (req.http.cookie) {
set req.http.Cookie = regsuball(req.http.Cookie, "_gat=[^;]+(; )?", ""); # Google Analytics
set req.http.Cookie = regsuball(req.http.Cookie, "_ga=[^;]+(; )?", ""); # Google Analytics
set req.http.Cookie = regsuball(req.http.Cookie, "_gaq=[^;]+(; )?", ""); # Google Analytics
set req.http.Cookie = regsuball(req.http.Cookie, "__utm[^=]*=[^;]+(; )?", ""); # Google Analytics
if (req.http.cookie ~ "^ *$") {
unset req.http.cookie;
}
}
}
sub vcl_backend_response {