Last active
June 10, 2021 15:13
-
-
Save jermainee/5c631a1f96100f1134f1bc7db428bcc5 to your computer and use it in GitHub Desktop.
Caching static files on NGINX
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 ~*\.(jpg|jpeg|png|gif|ico|css|js|webp)$ { | |
add_header Cache-Control "public"; | |
expires 365d; | |
log_not_found off; | |
access_log off; | |
} | |
location ~*\.(pdf)$ { | |
add_header Cache-Control "public"; | |
expires 30d; | |
log_not_found off; | |
access_log off; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment