title: Make Varnish ignore requests with Cookie header
body: <p>Varnish default behaviour is to never lookup for requests containing a <code>Cookie</code> header. In other words, a request containing a <code>Cookie</code> header will never be cached. I need to override this behaviour to just ignore requests with a <code>Cookie</code> header.</p>
  
  <p>Consider the next user behaviour in my application:</p>
  
  <ol>
  <li>User enters application home page (<code>/</code>), page should be cached, backend returns a <code>public</code> cache-control, everything is fine, page gets cached by Varnish.</li>
  <li>User navigates to a custom page (<code>/not-cacheable</code>) which is not cacheable, backend returns a <code>private</code> cache-control. Also returns a <code>Set-Cookie</code> header in the response. Varnish ignores this request and the user ends up with a cookie. So far so good.</li>
  <li>User navigates back to the home page (<code>/</code>), which, remember, is already cached. Problem is, the user request now carries a <code>Cookie</code> header. This causes Varnish to ignore the request and delegate to the backend.</li>
  </ol>
  
  <p>Deleting the <code>Cookie</code> <strong>won't work</strong> because when the user returns to the <code>/not-cacheable</code> route, he won't see his personalized page, as the <code>Cookie</code> header has been striped out. Instead, the backend returns a newly generated session with a new id in the <code>Set-Cookie</code>.</p>
  
  <p>Also, having every <code>Cookie</code> request to lookup in Varnish caused every request, regarding the method, or the backend response, to be cached. </p>
  
  <p>If there was some way of telling Varnish to just ignore the <code>Cookie</code> header, this way I could cache requests with that header, by letting the backend decide if the request should be cacheable or not.</p>
  
  <p>Any ideas?</p>