Merge pull request #1142 from mempool/wiz/update-nginx-conf-for-services-apis
Update nginx.conf for mempool.space services APIs
This commit is contained in:
		
						commit
						11b8b43e88
					
				@ -57,6 +57,12 @@
 | 
			
		||||
	location /api/v1/contributors/images {
 | 
			
		||||
		proxy_pass https://mempool.space;
 | 
			
		||||
	}
 | 
			
		||||
	location /api/v1/translators {
 | 
			
		||||
		proxy_pass https://mempool.space;
 | 
			
		||||
	}
 | 
			
		||||
	location /api/v1/translators/images {
 | 
			
		||||
		proxy_pass https://mempool.space;
 | 
			
		||||
	}
 | 
			
		||||
	location /api/v1/ws {
 | 
			
		||||
		proxy_pass http://127.0.0.1:8999/;
 | 
			
		||||
		proxy_http_version 1.1;
 | 
			
		||||
 | 
			
		||||
@ -1,11 +0,0 @@
 | 
			
		||||
location /api/v1/contributors/images {
 | 
			
		||||
	proxy_pass https://mempool.space;
 | 
			
		||||
	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;
 | 
			
		||||
}
 | 
			
		||||
@ -1,8 +0,0 @@
 | 
			
		||||
location /api/v1/contributors {
 | 
			
		||||
	proxy_pass https://mempool.space;
 | 
			
		||||
	proxy_hide_header onion-location;
 | 
			
		||||
	proxy_hide_header strict-transport-security;
 | 
			
		||||
	proxy_hide_header content-security-policy;
 | 
			
		||||
	proxy_hide_header x-frame-options;
 | 
			
		||||
	# don't rate limit this API prefix
 | 
			
		||||
}
 | 
			
		||||
@ -1,11 +0,0 @@
 | 
			
		||||
location /api/v1/donations/images {
 | 
			
		||||
	proxy_pass https://mempool.space;
 | 
			
		||||
	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;
 | 
			
		||||
}
 | 
			
		||||
@ -1,8 +0,0 @@
 | 
			
		||||
location /api/v1/donations {
 | 
			
		||||
	proxy_pass https://mempool.space;
 | 
			
		||||
	proxy_hide_header onion-location;
 | 
			
		||||
	proxy_hide_header strict-transport-security;
 | 
			
		||||
	proxy_hide_header content-security-policy;
 | 
			
		||||
	proxy_hide_header x-frame-options;
 | 
			
		||||
	# don't rate limit this API prefix
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										72
									
								
								production/nginx/location-api-v1-services.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								production/nginx/location-api-v1-services.conf
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,72 @@
 | 
			
		||||
location /api/v1/contributors/images {
 | 
			
		||||
	proxy_pass $mempoolSpaceServices;
 | 
			
		||||
	proxy_cache services;
 | 
			
		||||
	proxy_cache_background_update on;
 | 
			
		||||
	proxy_cache_use_stale updating;
 | 
			
		||||
	proxy_cache_valid 200 1w;
 | 
			
		||||
	expires 1w;
 | 
			
		||||
	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/contributors {
 | 
			
		||||
	proxy_pass $mempoolSpaceServices;
 | 
			
		||||
	proxy_cache services;
 | 
			
		||||
	proxy_cache_background_update on;
 | 
			
		||||
	proxy_cache_use_stale updating;
 | 
			
		||||
	proxy_cache_valid 200 1d;
 | 
			
		||||
	expires 1d;
 | 
			
		||||
	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 {
 | 
			
		||||
	proxy_pass $mempoolSpaceServices;
 | 
			
		||||
	proxy_cache services;
 | 
			
		||||
	proxy_cache_background_update on;
 | 
			
		||||
	proxy_cache_use_stale updating;
 | 
			
		||||
	proxy_cache_valid 200 1w;
 | 
			
		||||
	expires 1w;
 | 
			
		||||
	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 {
 | 
			
		||||
	proxy_pass $mempoolSpaceServices;
 | 
			
		||||
	proxy_cache services;
 | 
			
		||||
	proxy_cache_background_update on;
 | 
			
		||||
	proxy_cache_use_stale updating;
 | 
			
		||||
	proxy_cache_valid 200 1d;
 | 
			
		||||
	expires 1d;
 | 
			
		||||
	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/translators/images {
 | 
			
		||||
	proxy_pass $mempoolSpaceServices;
 | 
			
		||||
	proxy_cache services;
 | 
			
		||||
	proxy_cache_background_update on;
 | 
			
		||||
	proxy_cache_use_stale updating;
 | 
			
		||||
	proxy_cache_valid 200 1w;
 | 
			
		||||
	expires 1w;
 | 
			
		||||
	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/translators {
 | 
			
		||||
	proxy_pass $mempoolSpaceServices;
 | 
			
		||||
	proxy_cache services;
 | 
			
		||||
	proxy_cache_background_update on;
 | 
			
		||||
	proxy_cache_use_stale updating;
 | 
			
		||||
	proxy_cache_valid 200 1d;
 | 
			
		||||
	expires 1d;
 | 
			
		||||
	proxy_hide_header onion-location;
 | 
			
		||||
	proxy_hide_header strict-transport-security;
 | 
			
		||||
	proxy_hide_header content-security-policy;
 | 
			
		||||
	proxy_hide_header x-frame-options;
 | 
			
		||||
}
 | 
			
		||||
@ -32,7 +32,14 @@ http {
 | 
			
		||||
		listen 443 ssl http2;
 | 
			
		||||
		listen [::]:443 ssl http2;
 | 
			
		||||
		server_name mempool.ninja;
 | 
			
		||||
 | 
			
		||||
		# for services from mempool.space like contributors on about page
 | 
			
		||||
		set $mempoolSpaceServices "https://mempool.space";
 | 
			
		||||
 | 
			
		||||
		# for mempool/backend daemon, see upstream-mempool.conf
 | 
			
		||||
		set $mempoolBackend "http://mempool-bitcoin-mainnet";
 | 
			
		||||
 | 
			
		||||
		# for blockstream/electrs daemon, see upstream-electrs.conf
 | 
			
		||||
		set $electrsBackend "http://electrs-bitcoin-mainnet";
 | 
			
		||||
 | 
			
		||||
		# tor v3
 | 
			
		||||
@ -59,7 +66,14 @@ http {
 | 
			
		||||
		listen 443 ssl http2;
 | 
			
		||||
		listen [::]:443 ssl http2;
 | 
			
		||||
		server_name bisq.ninja;
 | 
			
		||||
 | 
			
		||||
		# for services from mempool.space like contributors on about page
 | 
			
		||||
		set $mempoolSpaceServices "https://mempool.space";
 | 
			
		||||
 | 
			
		||||
		# for mempool/backend daemon, see upstream-mempool.conf
 | 
			
		||||
		set $mempoolBackend "http://mempool-bisq-mainnet";
 | 
			
		||||
 | 
			
		||||
		# for blockstream/electrs daemon, see upstream-electrs.conf
 | 
			
		||||
		set $electrsBackend "http://electrs-bitcoin-mainnet";
 | 
			
		||||
 | 
			
		||||
		# tor v3
 | 
			
		||||
@ -86,7 +100,14 @@ http {
 | 
			
		||||
		listen 443 ssl http2;
 | 
			
		||||
		listen [::]:443 ssl http2;
 | 
			
		||||
		server_name liquid.place;
 | 
			
		||||
 | 
			
		||||
		# for services from mempool.space like contributors on about page
 | 
			
		||||
		set $mempoolSpaceServices "https://mempool.space";
 | 
			
		||||
 | 
			
		||||
		# for mempool/backend daemon, see upstream-mempool.conf
 | 
			
		||||
		set $mempoolBackend "http://mempool-liquid-mainnet";
 | 
			
		||||
 | 
			
		||||
		# for blockstream/electrs daemon, see upstream-electrs.conf
 | 
			
		||||
		set $electrsBackend "http://electrs-liquid-mainnet";
 | 
			
		||||
 | 
			
		||||
		# tor v3
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,5 @@
 | 
			
		||||
include mempool/production/nginx/server-common.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-contributors.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-contributors-images.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-donations.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-donations-images.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-services.conf;
 | 
			
		||||
 | 
			
		||||
proxy_cache markets;
 | 
			
		||||
proxy_cache_valid 200 30s;
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,5 @@
 | 
			
		||||
include mempool/production/nginx/server-common.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-contributors.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-contributors-images.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-donations.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-donations-images.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-services.conf;
 | 
			
		||||
include mempool/production/nginx/location-api.conf;
 | 
			
		||||
include mempool/production/nginx/location-liquid-api.conf;
 | 
			
		||||
include mempool/production/nginx/location-liquidtestnet-api.conf;
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,6 @@
 | 
			
		||||
include mempool/production/nginx/server-common.conf;
 | 
			
		||||
include mempool/production/nginx/location-redirects.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-contributors.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-contributors-images.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-donations.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-donations-images.conf;
 | 
			
		||||
include mempool/production/nginx/location-api-v1-services.conf;
 | 
			
		||||
include mempool/production/nginx/location-api.conf;
 | 
			
		||||
include mempool/production/nginx/location-testnet-api.conf;
 | 
			
		||||
include mempool/production/nginx/location-signet-api.conf;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user