Created
November 9, 2018 18:04
-
-
Save efontan/471449e6f090e25193975976df205e6c to your computer and use it in GitHub Desktop.
Nginx config for static content
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
server { | |
listen 80; | |
server_name localhost; | |
location /static-content/ { | |
alias /home/user/static-content/; | |
add_header "Access-Control-Allow-Origin" *; | |
add_header Timing-Allow-Origin *; | |
expires 14d; | |
add_header Pragma public; | |
add_header Cache-Control "public"; | |
add_header Vary Accept-Encoding; | |
# Allowed only GET HTTP method | |
limit_except GET { | |
deny all; | |
} | |
} | |
gzip on; | |
gzip_types text/css application/x-javascript text/javascript; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment