Proxy /api/v2/ on dev and prod environments
This commit is contained in:
parent
37030356dd
commit
2664f52a23
@ -33,6 +33,17 @@ if (configContent && configContent.BASE_MODULE === 'liquid') {
|
||||
"^/liquid": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquid/api/v2/**'],
|
||||
target: `http://127.0.0.1:8999`,
|
||||
secure: false,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
pathRewrite: {
|
||||
"^/liquid": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquid/api/**'],
|
||||
target: `http://127.0.0.1:3000`,
|
||||
@ -54,6 +65,17 @@ if (configContent && configContent.BASE_MODULE === 'liquid') {
|
||||
"^/liquidtestnet": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquidtestnet/api/v2/**'],
|
||||
target: `http://127.0.0.1:8999`,
|
||||
secure: false,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
pathRewrite: {
|
||||
"^/liquidtestnet": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquidtestnet/api/**'],
|
||||
target: `http://127.0.0.1:3000`,
|
||||
@ -106,6 +128,14 @@ PROXY_CONFIG.push(...[
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
},
|
||||
{
|
||||
context: ['/api/v2/**'],
|
||||
target: `http://127.0.0.1:8999`,
|
||||
secure: false,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
},
|
||||
{
|
||||
context: ['/api/**'],
|
||||
target: `http://127.0.0.1:3000`,
|
||||
|
||||
@ -33,6 +33,17 @@ if (configContent && configContent.BASE_MODULE === 'liquid') {
|
||||
"^/liquid": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquid/api/v2/**'],
|
||||
target: `http://localhost:8999`,
|
||||
secure: false,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
pathRewrite: {
|
||||
"^/liquid": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquid/api/**'],
|
||||
target: `http://localhost:8999`,
|
||||
@ -54,6 +65,17 @@ if (configContent && configContent.BASE_MODULE === 'liquid') {
|
||||
"^/liquidtestnet": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquidtestnet/api/v2/**'],
|
||||
target: `http://localhost:8999`,
|
||||
secure: false,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
pathRewrite: {
|
||||
"^/liquidtestnet": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquidtestnet/api/**'],
|
||||
target: `http://localhost:8999`,
|
||||
@ -94,6 +116,14 @@ PROXY_CONFIG.push(...[
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
},
|
||||
{
|
||||
context: ['/api/v2/**'],
|
||||
target: `http://localhost:8999`,
|
||||
secure: false,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
},
|
||||
{
|
||||
context: ['/api/**'],
|
||||
target: `http://localhost:8999`,
|
||||
|
||||
@ -33,6 +33,17 @@ if (configContent && configContent.BASE_MODULE === 'liquid') {
|
||||
"^/liquid": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquid/api/v2/**'],
|
||||
target: `http://localhost:8999`,
|
||||
secure: false,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
pathRewrite: {
|
||||
"^/liquid": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquid/api/**'],
|
||||
target: `https://liquid.network`,
|
||||
@ -51,6 +62,17 @@ if (configContent && configContent.BASE_MODULE === 'liquid') {
|
||||
"^/liquidtestnet": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquidtestnet/api/v2/**'],
|
||||
target: `http://localhost:8999`,
|
||||
secure: false,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
pathRewrite: {
|
||||
"^/liquidtestnet": ""
|
||||
},
|
||||
},
|
||||
{
|
||||
context: ['/liquidtestnet/api/**'],
|
||||
target: `https://liquid.network`,
|
||||
@ -78,6 +100,14 @@ PROXY_CONFIG.push(...[
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
},
|
||||
{
|
||||
context: ['/api/v2/**'],
|
||||
target: `http://localhost:8999`,
|
||||
secure: false,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
proxyTimeout: 30000,
|
||||
},
|
||||
{
|
||||
context: ['/api/**'],
|
||||
target: `https://mempool.space`,
|
||||
|
||||
@ -64,6 +64,9 @@
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8999/api/v1/;
|
||||
}
|
||||
location /api/v2 {
|
||||
proxy_pass http://127.0.0.1:8999/api/v2;
|
||||
}
|
||||
|
||||
# mainnet API
|
||||
location /ws {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user