Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,28 @@ LP_POOL_CONTRACT_IDS_MAINNET=
# without needing live RPC. Not for production.
SKIP_INDEXER=false

# ─── NGN rate limiting (naira rails creating routes) ─────────────────────────
# Per-IP limits catch one caller making many requests with different references.
# Per-reference limits catch one reference being hammered from different IPs.
# All configurable without a deploy; defaults are conservative.
#
# Provisioning: POST /ngn/customers
# NGN_PROVISION_WINDOW_MS=600000 # 10 min
# NGN_PROVISION_MAX=10 # 10 per IP per window
# NGN_PROVISION_REF_WINDOW_MS=600000 # 10 min
# NGN_PROVISION_REF_MAX=3 # 3 per reference per window
#
# KYC: POST /ngn/customers/kyc
# NGN_KYC_WINDOW_MS=1800000 # 30 min
# NGN_KYC_MAX=5 # 5 per IP per window
# NGN_KYC_REF_WINDOW_MS=1800000 # 30 min
# NGN_KYC_REF_MAX=2 # 2 per reference per window
#
# Orders: POST /ngn/onramp/orders, POST /ngn/bills
# NGN_ORDERS_WINDOW_MS=900000 # 15 min
# NGN_ORDERS_MAX=20 # 20 per IP per window
# NGN_ORDERS_REF_WINDOW_MS=900000 # 15 min
# NGN_ORDERS_REF_MAX=5 # 5 per reference per window
# ─── Additional runtime settings ────────────────────────────────────────────
# Every value in this section is optional. Empty values are placeholders only.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dev": "ts-node-dev --respawn --transpile-only src/index.ts",
"build": "tsc",
"start": "node dist/index.js",
"test": "jest --runInBand",
"test": "jest --runInBand --forceExit",
"test:integration": "vitest run --config vitest.integration.config.ts",
"test:watch": "jest --watch",
"test:chaos": "jest --runInBand --testPathPatterns=tests/chaos --testTimeout=300000 --config=jest.chaos.config.js",
Expand Down
Loading