Last active
September 13, 2017 13:40
-
-
Save nickknissen/66bb9f8325d2bd07920ee1a92b80f195 to your computer and use it in GitHub Desktop.
Get production images
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
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{REQUEST_FILENAME} !-f [NC] | |
| RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) http://example.com/$1 [NC,P,L] | |
| </IfModule> |
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
| # Directives to send expires headers and turn off 404 error logging. | |
| location ~* \.(js|css|png|jpe?g|gif|ico)$ { | |
| expires 24h; | |
| log_not_found off; | |
| try_files $uri $uri/ @production; | |
| } | |
| location @production { | |
| resolver 8.8.8.8; | |
| proxy_pass http://example.com/$uri; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment