What I'm doing is a little crazy, but since the GET requests are very strict, solr uses POST requests for the URL /solr/selectto execute a “semantically” GET.
I am trying to put a varnish in front of solr to do some caching. I put this in a function vcl_recv:
if (!(req.request == "GET" || req.request == "HEAD" ||
(req.request == "POST" && req.url == "/solr/select"))) {
/* We only deal with GET and HEAD by default */
/* Modified to support POST to /solr/select */
return (pass);
}
and varnish now tries to handle this, except that it automatically converts POST to GET.
I know that all this is pretty funny and far from any best practices, but is there anyway an easy way to use the varnish this way?
source
share