CI/CD / render (push) Waiting to run
The primary-network chains answer to either case; one spelling beats two. /v1/chain/c/rpc, /v1/chain/p, /v1/chain/x across the estate. Co-authored-by: Hanzo AI <[email protected]>
378 lines
11 KiB
JSON
378 lines
11 KiB
JSON
{
|
|
"version": 3,
|
|
"name": "Lux API Gateway - Testnet",
|
|
"port": 8080,
|
|
"timeout": "30s",
|
|
"cache_ttl": "0s",
|
|
"extra_config": {
|
|
"router": {
|
|
"return_error_msg": false
|
|
},
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 1000,
|
|
"client_max_rate": 100,
|
|
"strategy": "ip"
|
|
},
|
|
"qos/ratelimit/service": {
|
|
"max_rate": 3000,
|
|
"capacity": 3000
|
|
},
|
|
"security/cors": {
|
|
"allow_origins": [
|
|
"https://*.lux.network",
|
|
"https://*.lux.exchange",
|
|
"https://lux.network",
|
|
"https://lux.exchange",
|
|
"https://lux.market"
|
|
],
|
|
"allow_methods": [
|
|
"GET",
|
|
"POST",
|
|
"OPTIONS"
|
|
],
|
|
"allow_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"expose_headers": [
|
|
"Content-Length"
|
|
],
|
|
"max_age": "12h"
|
|
},
|
|
"security/http": {
|
|
"allowed_hosts": [],
|
|
"browser_xss_filter": true,
|
|
"content_type_nosniff": true,
|
|
"custom_frame_options_value": "DENY",
|
|
"force_sts_header": true,
|
|
"sts_include_subdomains": true,
|
|
"sts_seconds": 31536000
|
|
},
|
|
"modifier/response-headers-blacklist": {
|
|
"blacklist": [
|
|
"X-Gateway-Completed",
|
|
"node-id",
|
|
"Node-Id",
|
|
"Server"
|
|
]
|
|
}
|
|
},
|
|
"endpoints": [
|
|
{
|
|
"endpoint": "/v1/chain/c/rpc",
|
|
"method": "POST",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/chain/c/rpc",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 100,
|
|
"client_max_rate": 20,
|
|
"strategy": "ip",
|
|
"capacity": 200
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"endpoint": "/v1/chain/c/ws",
|
|
"method": "GET",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/chain/c/ws",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 50,
|
|
"client_max_rate": 5,
|
|
"strategy": "ip"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"endpoint": "/v1/chain/x",
|
|
"method": "POST",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/chain/x",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 100,
|
|
"client_max_rate": 20,
|
|
"strategy": "ip",
|
|
"capacity": 200
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"endpoint": "/v1/chain/p",
|
|
"method": "POST",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/chain/p",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 100,
|
|
"client_max_rate": 20,
|
|
"strategy": "ip",
|
|
"capacity": 200
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"endpoint": "/v1/chain/exchange",
|
|
"method": "POST",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/chain/exchange",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 100,
|
|
"client_max_rate": 20,
|
|
"strategy": "ip",
|
|
"capacity": 200
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"endpoint": "/v1/info",
|
|
"method": "POST",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"extra_config": {
|
|
"validation/cel": [
|
|
{
|
|
"check_expr": "req_body.matches('.*\"info\\\\.getNetworkID\".*') || req_body.matches('.*\"info\\\\.getNetworkName\".*') || req_body.matches('.*\"info\\\\.getBlockchainID\".*') || req_body.matches('.*\"info\\\\.isBootstrapped\".*')",
|
|
"message": "Method not allowed: only info.getNetworkID, info.getNetworkName, info.getBlockchainID, and info.isBootstrapped are permitted"
|
|
}
|
|
],
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 50,
|
|
"client_max_rate": 10,
|
|
"strategy": "ip"
|
|
}
|
|
},
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/info",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"endpoint": "/v1/health",
|
|
"method": "GET",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/health",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 30,
|
|
"client_max_rate": 5,
|
|
"strategy": "ip"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"endpoint": "/v1/index/C/block",
|
|
"method": "POST",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/index/C/block",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 100,
|
|
"client_max_rate": 20,
|
|
"strategy": "ip",
|
|
"capacity": 200
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"endpoint": "/v1/index/C/tx",
|
|
"method": "POST",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/index/C/tx",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 100,
|
|
"client_max_rate": 20,
|
|
"strategy": "ip",
|
|
"capacity": 200
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"endpoint": "/v1/index/X/tx",
|
|
"method": "POST",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/index/X/tx",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 100,
|
|
"client_max_rate": 20,
|
|
"strategy": "ip",
|
|
"capacity": 200
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"endpoint": "/v1/index/P/block",
|
|
"method": "POST",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/index/P/block",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 100,
|
|
"client_max_rate": 20,
|
|
"strategy": "ip",
|
|
"capacity": 200
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"endpoint": "/v1/index/P/tx",
|
|
"method": "POST",
|
|
"input_headers": [
|
|
"Content-Type",
|
|
"Authorization"
|
|
],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/index/P/tx",
|
|
"host": [
|
|
"http://luxd-headless.lux-testnet.svc.cluster.local:9640"
|
|
],
|
|
"encoding": "no-op"
|
|
}
|
|
],
|
|
"extra_config": {
|
|
"qos/ratelimit/router": {
|
|
"max_rate": 100,
|
|
"client_max_rate": 20,
|
|
"strategy": "ip",
|
|
"capacity": 200
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|