if (req.url ~ "do_ajax.php" && req.request == "GET") {
return (lookup);
}
I put this line inside the varnish.vcl config, but I get this header in the response header:
no-cache, must-revalidate, max-age=0
I also tried with:
if (req.url ~ "do_ajax.php" && req.request == "GET") {
return (hash);
}
But varnish fails to restart unless I remove return (hash).
Now, I am wondering if there's a line in the varnish config file that forces all ajax calls to not accept cache, and the second thing I don't understand is why I am getting it in the response header, shouldn't it be the client that sends this in the request header instead? Why is the server returning this?