From 511b827bf56b7d099afdba1db25d047bea24e050 Mon Sep 17 00:00:00 2001 From: junderw Date: Wed, 16 Aug 2023 00:44:06 -0700 Subject: [PATCH] Nginx: Ignore all internal-api paths --- nginx-mempool.conf | 5 +++++ production/nginx/location-api.conf | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/nginx-mempool.conf b/nginx-mempool.conf index 67cb15939..bc8efc59e 100644 --- a/nginx-mempool.conf +++ b/nginx-mempool.conf @@ -39,6 +39,11 @@ try_files $uri $uri/ /$1/index.html =404; } + # any path containing .*/internal-api/.* anywhere is ignored + location ~ ^/.*?/internal-api/ { + return 404; + } + # static API docs location = /api { try_files $uri $uri/ /en-US/index.html =404; diff --git a/production/nginx/location-api.conf b/production/nginx/location-api.conf index 2b2b85411..dba798719 100644 --- a/production/nginx/location-api.conf +++ b/production/nginx/location-api.conf @@ -2,6 +2,11 @@ # mempool # ########### +# any path containing .*/internal-api/.* anywhere is ignored +location ~ ^/.*?/internal-api/ { + return 404; +} + # websocket has special HTTP headers location /api/v1/ws { try_files /dev/null @mempool-api-v1-websocket;