Nginx: Ignore all internal-api paths

This commit is contained in:
junderw 2023-08-16 00:44:06 -07:00 committed by Mononaut
parent 1e69f3b331
commit 511b827bf5
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
2 changed files with 10 additions and 0 deletions

View File

@ -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;

View File

@ -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;