assets.conf 860 B

12345678910111213141516171819202122232425262728293031
  1. location ~* ^.*\.(css|js|jpe?g|gif|png|webp|woff|eot|ttf|svg|ico|css\.map|js\.map)$ {
  2. if_modified_since off;
  3. # use the public cache
  4. proxy_cache public-cache;
  5. proxy_cache_key $host$request_uri;
  6. # ignore these headers for media
  7. proxy_ignore_headers Set-Cookie Cache-Control Expires X-Accel-Expires;
  8. # cache 200s and also 404s (not ideal but there are a few 404 images for some reason)
  9. proxy_cache_valid any 30m;
  10. proxy_cache_valid 404 1m;
  11. # strip this header to avoid If-Modified-Since requests
  12. proxy_hide_header Last-Modified;
  13. proxy_hide_header Cache-Control;
  14. proxy_hide_header Vary;
  15. proxy_cache_bypass 0;
  16. proxy_no_cache 0;
  17. proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504 http_404;
  18. proxy_connect_timeout 5s;
  19. proxy_read_timeout 45s;
  20. expires @30m;
  21. access_log off;
  22. include conf.d/include/proxy.conf;
  23. }