Created
September 21, 2018 09:38
-
-
Save themasch/646bcf9b09641d67f7b1eb89d2303f9d to your computer and use it in GitHub Desktop.
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
proxy_cache_path /var/cache/nginx/npm_cache levels=1:2 keys_zone=npm_cache:10m; | |
upstream npm_registry { | |
server registry.npmjs.org:443; | |
} | |
server { | |
listen 80; | |
server_name blblabla; | |
proxy_set_header Host registry.npmjs.org; | |
location / { | |
proxy_ignore_headers Cache-Control; | |
proxy_cache npm_cache; | |
proxy_cache_valid 5m; | |
add_header X-Cache $upstream_cache_status; | |
proxy_pass https://npm_registry; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment