I think so, yes. And if you have multiple Firewalls, varnish will need to be aware and send request based on path. Lets not try to solve this right now...

----- Reply message -----
Von: "Joel Wurtz" <notifications@github.com>
An: "FriendsOfSymfony/FOSHttpCache" <FOSHttpCache@noreply.github.com>
Cc: "David Buchmann" <david@liip.ch>
Betreff: [FOSHttpCache] Add tests for head request, and add cookies on a hit for pass action (#62)
Datum: Fr., Mai. 23, 2014 16:48
In doc/varnish-configuration.md: 
>          set req.url     = "/user_context_head.php"; 
>          set req.request = "HEAD"; 
>   
> -        # By default, Varnish does not cache when cookies are present. 
> -        # So remove Cookie header and store it in a temporary header. 
> -        set req.http.x-original-cookie = req.http.cookie; 
> -        unset req.http.cookie; 
> +        # 
> +        # By default, Varnish does not look for cache when a Cookie or 
> +        # Authorization header is present. 
> +        # 
> +        # You can force this lookup by uncommenting the line below. 
> +        # 
> +        # return (lookup); 

IMO For starting a session with symfony, the url for the HEAD request must be under the firewall, otherwise, it will cache a hash without session, and we will never had a Cookie unless a POST/PUT (not cached) request is made. 

But we need to test this with session start, my brain is actually not at 100% to see how all the thing will work with Set-Cookie / Cookie / start session and all this. 

However, i'm pretty confident as i already have test the old method (remove / insert cookie) with a symfony application which worked perfectly. 

&mdash;
Reply to this email directly or view it on GitHub.