Created
November 6, 2020 09:01
-
-
Save wouterds/fd548d3400d79bce47be87def9857739 to your computer and use it in GitHub Desktop.
Cache static assets served from node container for a year
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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