https://github.com/knight42/rustcrates-mirror
(Obsolete) python script used to save crates on https://crates.io
https://github.com/knight42/rustcrates-mirror
Last synced: 3 months ago
JSON representation
(Obsolete) python script used to save crates on https://crates.io
- Host: GitHub
- URL: https://github.com/knight42/rustcrates-mirror
- Owner: knight42
- License: mit
- Archived: true
- Created: 2016-01-21T12:54:23.000Z (about 9 years ago)
- Default Branch: nginx
- Last Pushed: 2016-09-26T14:06:49.000Z (over 8 years ago)
- Last Synced: 2024-11-14T12:05:59.772Z (3 months ago)
- Homepage:
- Size: 37.1 KB
- Stars: 16
- Watchers: 13
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
README
============nginx should suffice for setting up reverse proxy for crates.io:
```
server {
listen 80;
listen 443 ssl http2;
listen [::]:80;
listen [::]:443 ssl http2;server_name crates-io.example.com
access_log /var/log/nginx/crates_access.log;
error_log /var/log/nginx/crates_error.log;ssl_certificate /etc/nginx/key/example.com.crt;
ssl_certificate_key /etc/nginx/key/example.com.key;proxy_buffering on;
proxy_ssl_server_name on;
proxy_connect_timeout 10s;proxy_cache STATIC;
proxy_cache_valid 200 12h;
proxy_cache_valid 400 502 504 1m;
proxy_cache_valid any 5m;
proxy_cache_revalidate on;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;location /api/v1/crates {
rewrite ^/api/v1/crates/([^/]+)/([^/]+)/download$ /crates/$1/$1-$2.crate break;
error_page 500 502 504 =302 https://crates-io.s3-us-west-1.amazonaws.com$uri;
proxy_pass https://crates-io.s3-us-west-1.amazonaws.com;
}}
```