Hi everyone,

I'm trying to alter req.url to custom value based on backend that Varnish
will use.

Following config snippet worked fine before I've switched to director:

--------------------- 8-< ---------------------

#set req.backend = index3;  # direct connection to backend
set req.backend = search;  # using rr director (for index3 and 4)

if ( req.url ~ "^/solr/round-robin" ) {

   if ( req.backend == index3 ) {
     set req.url = regsub(req.url, "round-robin", "index3");
   }

   if ( req.backend == index4 ) {
     set req.url = regsub(req.url, "round-robin", "index4");
    }
}

--------------------- >-8 ---------------------

Is there way to access the real backend's name - or something else - which
would tell me to which backend a request will be sent during the recv phase?

Kind Regards,
Slawek
_______________________________________________
varnish-misc mailing list
[email protected]
http://lists.varnish-cache.org/mailman/listinfo/varnish-misc

Reply via email to