chunked_transfer_encoding off; add_header Content-Length $sent_http_content_length;
http { ... proxy_temp_path /var/cache/nginx/proxy_temp 1 2; proxy_cache_path /var/cache/nginx/proxy_cache levels=1:2 keys_zone=static:100m inactive=60m max_size=1g; ... server { ... location ~* ^/app/.*\.(css|eot|gif|jpg|js|ico|pdf|png|svg|ttf|woff|woff2)$ { proxy_cache static; proxy_cache_key $request_method$request_uri; proxy_cache_convert_head off; proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; proxy_cache_background_update on; proxy_cache_revalidate on; proxy_cache_valid 200 301 302 5m; proxy_cache_valid 404 1m; ... } ... } }