I'd like to use etag caching directly in my application / verify the eTag in my Application. How is it possible to route the "If-None-Match" header to the backends? It seems that Varnish is cutting out this header by default.
You can rewrite it to a different header that varnish doesn't know about, and then read that header in your backend instead.
At the top of vcl_recv, try:
and then read the X-If-None-Match-Previously header in your application.
I'm not sure how that's going to interact with your caching but that will pass the header data through if Varnish is stripping it from its backend requests.
Okay, solved it: Varnish does not remove the If-None-Match header. It was just my web app delivered from cache while requests were still coming in. Chrome served the old version of the page. COUGH. COUGH. COUGH.