-
-
Save jordangraft/f88188a4c9e60cc0b9217718e0daf3e7 to your computer and use it in GitHub Desktop.
Nginx sites configuration file for pushing caching headers
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
# in you sites-available files | |
# gzip all asset requests | |
location ^~ /assets/ { | |
gzip_static on; | |
expires max; | |
add_header Cache-Control public; | |
add_header Access-Control-Allow-Origin *; | |
} | |
location ~* ^.+\.(jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|mp3|flv|mpeg|avi|eof|ttf|woff|woff2)$ { | |
try_files $uri @door; | |
expires max; | |
add_header Cache-Control public; | |
add_header Access-Control-Allow-Origin *; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment