diff --git a/HowtoVarnish.md b/HowtoVarnish.md index 1832ab3f..85733199 100644 --- a/HowtoVarnish.md +++ b/HowtoVarnish.md @@ -139,11 +139,15 @@ Voyons un exemple simple : ~~~ sub vcl_recv { - - if (req.http.host ~ "(www\.example\.com|example\.com)") { + if (req.http.host == "example.com" || + req.http.host == "www.example.com") { set req.backend_hint = default; } - + # Version avec une regex (plus coûteux) : + #if (req.http.host ~ "(example\.com|www\.example\.com)") { + # set req.backend_hint = default; + #} + if (req.url ~ "^/images") { unset req.http.cookie; }