Support If-Modified-Since header for caching with NGINX
Support If-Modified-Since header for caching with NGINX

When an NGINX server is used for caching there needs to be a way to
know whether a cached response is still valid to prevent serving stale
content. With NGINX and the proxy_cache_revalidate option this works
through the If-Modified-Since header set by NGINX and 304 status codes
with an empty response body sent to NGINX if the response is still
valid. For NGINX to be able to set the If-Modified-Since header, we
first need to set the Last-Modified header for the initial response.
Overall this reduces GCS egress costs when the NGINX cache is large
enough.
This patch also includes the change proposed in
https://github.com/daichirata/gcsproxy/issues/6#issuecomment-580974249

daichirata/gcsproxy