From a52f98c39d79c51543bba8540856d084b14ab146 Mon Sep 17 00:00:00 2001 From: wiz Date: Mon, 8 Mar 2021 18:33:02 +0900 Subject: [PATCH] Proxy /api/v1/contributors from mempool.space, also fix HTTP headers Fixes #366 --- production/nginx-mempool.conf | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/production/nginx-mempool.conf b/production/nginx-mempool.conf index e0489ad0b..3c11c0e6e 100644 --- a/production/nginx-mempool.conf +++ b/production/nginx-mempool.conf @@ -102,16 +102,37 @@ try_files $uri $uri/ /en-US/index.html =404; } - # mainnet API - location /api/v1/donations { - proxy_pass https://node220.bitcoin.wiz.biz; + # serivces API + location /api/v1/contributors { # 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 { + # don't rate limit this API prefix proxy_pass https://node220.bitcoin.wiz.biz; proxy_cache services; 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 { proxy_pass http://127.0.0.1:8999/; proxy_http_version 1.1;