Hello all, I have inherited a varnish server. And I am a little confused
about a few lines in that config.

It has the following in vcl_recv

    # Don't cache if there are request cookies
    if (req.http.Cookie) {
        set req.http.X-Debug-Varnish-Nocache-Recv = "Got request cookie ("
+ req.http.Cookie + ")";

        return (pass);
    }

    if (req.url ~
"\.(png|gif|jpg|jpeg|ico|swf|css|js|pdf|ico|js|ogg|mp4)$") {
        unset req.http.cookie;
    }
    if (req.url ~ "^/(includes|images|templates)") {
        unset req.http.cookie;
    }

So the first if block tells request with req.http.Cookie to pass to the
backend.
The second tells if the requested url ends with
.png|gif|jpg|jpeg|ico|swf|css|js|pdf|ico|js|ogg|mp4 and so on to unset the
cookie.
But will these rules be executed or is the request already passed to the
backend?

Thanks for your time
regards
Neuteboom
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to