varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
185 stars 86 forks source link

About vmod_var #64

Closed redbox-cdn closed 7 years ago

redbox-cdn commented 7 years ago

Hi

vmod_var can be used except vcl_recv ? I would like to use the sub vcl_backend_response

sub vcl_recv {
var.set("test", "1111");
}

 sub vcl_backend_response {
    set beresp.http.TEST = var.get("test");
}

Best regards.

gquintard commented 7 years ago

Yes, however it's scope, meaning the client and backend contexts don't communicate, so what you are doing here won't work.

If you have more questions, please use the mailing list (misc) orIRC, we try to keep the github issues for bugs.

www.varnish-cache.org/support/