varnish & cookies & multilanguage

rafailowski rafailow at gmail.com
Thu Aug 9 15:11:44 CEST 2007


Hello, just a (late!) feed back...
It's works really fine.

sub vcl_recv {
        if (req.http.cookie ~ "LOCALIZER_LANGUAGE") {
                set req.http.mylang = regsub(
                        req.http.cookie,
                        ".*LOCALIZER_LANGUAGE=%22(..)%22.*",
                        "$1");
                lookup;
        }
        [...]
        lookup;
}

sub vcl_hash {
        set req.hash += req.http.mylang;
}

Thanks again :)



More information about the varnish-misc mailing list