Merge branch 'main' into telackey/mm
All checks were successful
DIN Payments Stack Test / Run DIN payments stack test (pull_request) Successful in 48m47s

This commit is contained in:
Thomas E Lackey 2024-05-31 13:05:11 -05:00
commit fd2a2e8c72
3 changed files with 23 additions and 5 deletions

View File

@ -43,6 +43,7 @@ services:
environment:
CERC_NITRO_CHAIN_PK: ${CERC_NITRO_CHAIN_PK_BOB:-570b909da9669b2f35a0b1ac70b8358516d55ae1b5b3710e95e9a94395090597}
CERC_NITRO_CHAIN_URL: ${CERC_NITRO_CHAIN_URL:-ws://fixturenet-eth-geth-1:8546}
CERC_NITRO_GETH_HTTP_URL: ${CERC_NITRO_GETH_HTTP_URL:-http://fixturenet-eth-geth-1:8545}
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}

View File

@ -16,4 +16,4 @@ CERC_NITRO_MSG_PORT=3006
CERC_NITRO_RPC_PORT=4006
CERC_NITRO_UI_PORT=4106
CERC_NITRO_USE_DURABLE_STORE=true
CERC_NITRO_WS_MSG_PORT=5006
CERC_NITRO_WS_MSG_PORT=5006

View File

@ -3,8 +3,13 @@
reverse_proxy http://go-nitro-bob:8547
}
handle /nitro/pay* {
uri strip_prefix /nitro
reverse_proxy http://go-nitro-bob:8547
}
@eth-key-in-header {
path_regexp /eth/?$
path_regexp (/nitro)?/eth/?$
header X-Api-Key *
}
@ -20,12 +25,12 @@
}
@eth-key-in-path {
path_regexp apikey eth/(.+)$
path_regexp apikey (/nitro)?/eth/(.+)$
}
handle @eth-key-in-path {
forward_auth go-nitro-bob:8547 {
uri /auth/{re.apikey.1}
uri /auth/{re.apikey.2}
}
rewrite * /
reverse_proxy {$CERC_ETH_RPC_ENDPOINT} {
@ -34,8 +39,20 @@
}
}
handle /nitro/eth {
rewrite * /
reverse_proxy go-nitro-bob:8547 {
header_up Host {upstream_hostport}
header_up -X-Forwarded-*
}
}
handle /eth* {
respond "401 Unauthorized" 401
rewrite * /
reverse_proxy go-nitro-bob:8547 {
header_up Host {upstream_hostport}
header_up -X-Forwarded-*
}
}
handle /ts-nitro* {