Hi all,

I have a varnish config looking roughly like this:

backend be1 {
  .host = "10.10.10.10";
  .port = "80";
}

sub vcl_recv {
    elseif (req.http.host ~ "^x.example.com") {
        set req.http.Host = "host.example.com";
        set req.backend = be1;
    }
    elseif (req.http.host ~ "^xi.example.com") {
        set req.http.Host = "host.example.com";
        set req.backend = be1;
    }
}

The backend server delivers dynamically rendered images I need to cache.
If the original requests comes in for Host x.example.com, the TTL can be
 12h, if the request is for xi.example.com, the TTL is 15m.

Since I cannot use "req.http.host" in vcl_fetch and the req.url look the
same, how can I distinguish the two cases and set the obj.ttl differently?

Regards,

        Peter
_______________________________________________
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to