Varnish5 builtin VCL without pipe
Poul-Henning Kamp
phk at phk.freebsd.dk
Wed Apr 6 10:27:21 CEST 2016
Can we make builtin::vcl_recv{} look like this in Varnish5 ?
sub vcl_recv {
if (req.method == "PRI" || /* HTTP/2.0 */
req.method == "CONNECT" ||
req.method == "OPTIONS" ||
req.method == "TRACE") {
return (synth(405));
}
if (req.method != "GET" && req.method != "HEAD") {
/* We only deal with GET and HEAD by default */
return (pass);
}
if (req.http.Authorization || req.http.Cookie) {
/* Not cacheable by default */
return (pass);
}
return (hash);
}
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-dev
mailing list