Slide 46
Slide 46 text
vcl 4.0;
import std;
backend default {
.host = "127.0.0.1";
.port = "8080";
.max_connections = 300;
.first_byte_timeout = 100s;
.connect_timeout = 10s;
.between_bytes_timeout = 5s;
}
acl purge {
"192.168.33.10";
"localhost";
"127.0.0.1";
"::1";
}
sub purge_regex {
ban("obj.http.X-Req-URL ~ " + req.url + " && obj.http.X-Req-Host == " +
req.http.host);
}
sub purge_exact {
ban("obj.http.X-Req-URL == " + req.url + " && obj.http.X-Req-Host == " +
req.http.host);
}
sub purge_page {
set req.url = regsub(req.url, "\?.*$", "");
ban("obj.http.X-Req-URL-Base == " + req.url + " && obj.http.X-Req-Host == "
+ req.http.host);
}