Add suggestions from wiz
Co-authored-by: wiz <j@wiz.biz>
This commit is contained in:
parent
d16773bfa0
commit
502a1c021e
@ -214,11 +214,11 @@ class ElectrsApi implements AbstractBitcoinApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async $getMempoolTransactions(txids: string[]): Promise<IEsploraApi.Transaction[]> {
|
async $getMempoolTransactions(txids: string[]): Promise<IEsploraApi.Transaction[]> {
|
||||||
return this.failoverRouter.$post<IEsploraApi.Transaction[]>('/internal-api/mempool/txs', txids, 'json');
|
return this.failoverRouter.$post<IEsploraApi.Transaction[]>('/internal/mempool/txs', txids, 'json');
|
||||||
}
|
}
|
||||||
|
|
||||||
async $getAllMempoolTransactions(lastSeenTxid?: string): Promise<IEsploraApi.Transaction[]> {
|
async $getAllMempoolTransactions(lastSeenTxid?: string): Promise<IEsploraApi.Transaction[]> {
|
||||||
return this.failoverRouter.$get<IEsploraApi.Transaction[]>('/internal-api/mempool/txs' + (lastSeenTxid ? '/' + lastSeenTxid : ''));
|
return this.failoverRouter.$get<IEsploraApi.Transaction[]>('/internal/mempool/txs' + (lastSeenTxid ? '/' + lastSeenTxid : ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
$getTransactionHex(txId: string): Promise<string> {
|
$getTransactionHex(txId: string): Promise<string> {
|
||||||
|
@ -39,11 +39,6 @@
|
|||||||
try_files $uri $uri/ /$1/index.html =404;
|
try_files $uri $uri/ /$1/index.html =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
# any path containing .*/internal-api/.* anywhere is ignored
|
|
||||||
location ~ ^/.*?/internal-api/ {
|
|
||||||
return 404;
|
|
||||||
}
|
|
||||||
|
|
||||||
# static API docs
|
# static API docs
|
||||||
location = /api {
|
location = /api {
|
||||||
try_files $uri $uri/ /en-US/index.html =404;
|
try_files $uri $uri/ /en-US/index.html =404;
|
||||||
|
@ -2,11 +2,12 @@
|
|||||||
# mempool #
|
# mempool #
|
||||||
###########
|
###########
|
||||||
|
|
||||||
# any path containing .*/internal-api/.* anywhere is ignored
|
location /api/internal/ {
|
||||||
location ~ ^/.*?/internal-api/ {
|
return 404;
|
||||||
|
}
|
||||||
|
location /api/v1/internal/ {
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
|
|
||||||
# websocket has special HTTP headers
|
# websocket has special HTTP headers
|
||||||
location /api/v1/ws {
|
location /api/v1/ws {
|
||||||
try_files /dev/null @mempool-api-v1-websocket;
|
try_files /dev/null @mempool-api-v1-websocket;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user