amélioration
This commit is contained in:
parent
fa55a55648
commit
7d30147882
|
@ -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 {
|
sub vcl_backend_response {
|
||||||
set beresp.ttl = 1800s;
|
set beresp.ttl = 1800s;
|
||||||
#unset beresp.http.expires;
|
#unset beresp.http.expires;
|
||||||
set beresp.http.cache-control = "max-age=1800";
|
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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
@ -362,6 +354,17 @@ sub vcl_recv {
|
||||||
if (req.http.Cookie ~ "(VARNISH|DRUPAL_UID)") {
|
if (req.http.Cookie ~ "(VARNISH|DRUPAL_UID)") {
|
||||||
return (pass);
|
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 {
|
sub vcl_backend_response {
|
||||||
|
|
Loading…
Reference in a new issue