Skip to content

Instantly share code, notes, and snippets.

@wouterds
Created November 6, 2020 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wouterds/fd548d3400d79bce47be87def9857739 to your computer and use it in GitHub Desktop.
Save wouterds/fd548d3400d79bce47be87def9857739 to your computer and use it in GitHub Desktop.
Cache static assets served from node container for a year
location ~ \.(?:ico|css|js|gif|jpe?g|png|webp|gif|svg|txt)$ {
proxy_pass http://node:3000;
proxy_hide_header Cache-Control;
add_header Cache-Control "public, max-age=31536000, immutable";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment