Ajout exemple sans regex
This commit is contained in:
parent
e431fab65f
commit
053d44d71a
|
@ -139,10 +139,14 @@ Voyons un exemple simple :
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
sub vcl_recv {
|
sub vcl_recv {
|
||||||
|
if (req.http.host == "example.com" ||
|
||||||
if (req.http.host ~ "(www\.example\.com|example\.com)") {
|
req.http.host == "www.example.com") {
|
||||||
set req.backend_hint = default;
|
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") {
|
if (req.url ~ "^/images") {
|
||||||
unset req.http.cookie;
|
unset req.http.cookie;
|
||||||
|
|
Loading…
Reference in a new issue