On 25/08/2020 17:22, Nils Goroll wrote:
> You could do the same thing with a string and the host header or even use a
> string and https://github.com/nigoroll/libvmod-dynamic to turn that into a
> backend at run time.

I noticed that this is probably what you want.

So you might want to consider

/* env.inc.vcl */

sub vcl_init {

    new be_name = constant.string("foo.bar.com");

}

/* main.vcl */

vcl 4.1;

import constant;    // I forgot this in my previous email

include "env.inc.vcl";

sub vcl_init {

    new dyn = dynamic.director();

}

sub vcl_backend_fetch {

    set bereq.backend = dyn.backend(be_name.get());

}




_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to