Proxy /api/v1/contributors from mempool.space, also fix HTTP headers

Fixes #366
This commit is contained in:
wiz 2021-03-08 18:33:02 +09:00
parent 7beb832007
commit a52f98c39d
No known key found for this signature in database
GPG Key ID: A394E332255A6173

View File

@ -102,16 +102,37 @@
try_files $uri $uri/ /en-US/index.html =404; try_files $uri $uri/ /en-US/index.html =404;
} }
# mainnet API # serivces API
location /api/v1/donations { location /api/v1/contributors {
proxy_pass https://node220.bitcoin.wiz.biz;
# don't rate limit this API prefix # don't rate limit this API prefix
proxy_pass https://node220.bitcoin.wiz.biz;
proxy_hide_header onion-location;
proxy_hide_header strict-transport-security;
proxy_hide_header content-security-policy;
proxy_hide_header x-frame-options;
}
location /api/v1/donations {
# don't rate limit this API prefix
proxy_pass https://node220.bitcoin.wiz.biz;
proxy_hide_header onion-location;
proxy_hide_header strict-transport-security;
proxy_hide_header content-security-policy;
proxy_hide_header x-frame-options;
} }
location /api/v1/donations/images { location /api/v1/donations/images {
# don't rate limit this API prefix
proxy_pass https://node220.bitcoin.wiz.biz; proxy_pass https://node220.bitcoin.wiz.biz;
proxy_cache services; proxy_cache services;
proxy_cache_valid 200 1d; proxy_cache_valid 200 1d;
expires 7d;
add_header Cache-Control "public, no-transform";
proxy_hide_header onion-location;
proxy_hide_header strict-transport-security;
proxy_hide_header content-security-policy;
proxy_hide_header x-frame-options;
} }
# mainnet API
location /api/v1/ws { location /api/v1/ws {
proxy_pass http://127.0.0.1:8999/; proxy_pass http://127.0.0.1:8999/;
proxy_http_version 1.1; proxy_http_version 1.1;