-
-
Save Kaiderella/201245e565ca5e4f04ca33e6844b7242 to your computer and use it in GitHub Desktop.
Cache-Control Headers on Nginx
This file contains 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 ~* \.(png|jpg|jpeg|webp|gif)$ { | |
expires 365d; | |
add_header Cache-Control "public, no-transform"; | |
} | |
location ~* \.(js|css|pdf|html|swf)$ { | |
expires 30d; | |
add_header Cache-Control "public, no-transform"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment