Ajout exemple sans regex
This commit is contained in:
parent
e431fab65f
commit
053d44d71a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue