2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								include mempool/production/nginx/server-common.conf;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-14 20:38:10 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								include mempool/production/nginx/location-api-v1-services.conf;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								proxy_cache markets;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								proxy_cache_valid 200 30s;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# route esplora APIs to esplora
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/tx/ {
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /$1 break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @esplora-api-cache-disabled;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							
								
									
										
										
										
											2023-03-04 15:53:49 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								location /api/address-prefix/ {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /$1 break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @esplora-api-cache-disabled;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# rewrite APIs to match what backend expects
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/currencies {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /api/v1/bisq/markets/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/depth {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /api/v1/bisq/markets/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/hloc {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /api/v1/bisq/markets/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/offers {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /api/v1/bisq/markets/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/ticker {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /api/v1/bisq/markets/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/trades {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /api/v1/bisq/markets/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/volumes {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /api/v1/bisq/markets/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/markets {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /api/v1/bisq/markets/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/v1 {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/v1/(.*) /api/v1/bisq/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /api/v1/bisq/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /api/v1/ws {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/api/(.*) /api/v1/bisq/$1 break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq-websocket;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /bisq/api/v1/ws {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/bisq/api/v1/(.*) /api/v1/bisq/$1 break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq-websocket;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /bisq/api/v1 {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rewrite ^/bisq/api/v1/(.*) /api/v1/bisq/$1 break;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location /bisq/api {
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									rewrite ^/bisq/api/(.*) /api/v1/bisq/$1 break;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									try_files /dev/null @mempool-bisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								location @mempool-bisq-websocket {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_pass $mempoolBisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_http_version 1.1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_set_header Upgrade $http_upgrade;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_set_header Connection "Upgrade";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location @mempool-bisq {
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									proxy_pass $mempoolBisq;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-11 15:31:13 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									proxy_set_header Host $host;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_set_header X-Real-IP $remote_addr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									proxy_set_header X-Forwarded-Proto $scheme;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_redirect off;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								location @esplora-api-cache-disabled {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_pass $esploraMainnet;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-11 15:31:13 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									proxy_set_header Host $host;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									proxy_set_header X-Real-IP $remote_addr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_set_header X-Forwarded-Proto $scheme;
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 14:01:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_redirect off;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									proxy_buffering off;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									expires -1;
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-04 15:28:17 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |