Guillaume, Poul-Henning, thank you for your suggestions. Regarding, > - create a static backend point to you k8s proxy, and just set req.http.host to whatever value you want.
I don't think this would work for me since I'm working with a backend definition, trying to change the IP address (/hostname) to which the backend points to and not simply trying to change the Host header of the request. Cheers, -Hugues On Mon, Sep 9, 2019 at 11:54 PM Guillaume Quintard < [email protected]> wrote: > True, but that amounts to template processing :-) > > -- > Guillaume Quintard > > > On Tue, Sep 10, 2019 at 8:44 AM Poul-Henning Kamp <[email protected]> > wrote: > >> -------- >> In message < >> caj6zyqy5rnbjfcs88re6-hmfsqvyuzbokhoofq_c+suqnrq...@mail.gmail.com> >> , Guillaume Quintard writes: >> >> >I see two ways: >> >> There is a third way: >> >> You can use: >> >> include "somefile" >> >> anywhere and everywhere in a VCL program. >> >> Before you start your varnishd, do this in a shell script: >> >> echo "\"$ENVIRONMENT_VARIABLE_HOSTNAME\"" > >> /somewhere/hostname.vcl >> >> Then in VCL: >> >> backend b0 { >> .host = include "/somewhere/hostname.vcl" ; >> .port 80 >> ... >> >> >> >> -- >> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 >> [email protected] | TCP/IP since RFC 956 >> FreeBSD committer | BSD since 4.3-tahoe >> Never attribute to malice what can adequately be explained by >> incompetence. >> > _______________________________________________ > varnish-misc mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
