Compare commits

..

10 Commits

Author SHA1 Message Date
6e0870b2f1 merge upstream 2026-07-18 10:18:15 +03:30
e474f2d52d added server config from env 2026-07-18 10:17:52 +03:30
5ace0165db Merge pull request 'main' (#11) from s.hajizadeh/esg:main into main
Reviewed-on: Shared/esg#11
2026-07-05 12:12:13 +03:30
9fa4144949 merge upstream 2026-07-05 12:11:47 +03:30
Soheil Hajizadeh
8af8c8d6df fixed 2026-07-05 11:52:32 +03:30
73966878a2 Merge pull request 'api url' (#10) from s.hajizadeh/esg:main into main
Reviewed-on: Shared/esg#10
2026-07-04 14:30:58 +03:30
Soheil Hajizadeh
e7bb312db2 api url 2026-07-04 14:29:00 +03:30
62c8c6a3b4 Merge pull request 'main' (#9) from s.hajizadeh/esg:main into main
Reviewed-on: Shared/esg#9
2026-06-29 17:26:26 +03:30
91f43c312f merge upstream 2026-06-29 17:25:43 +03:30
4a65f356df Merge pull request 'main' (#8) from s.hajizadeh/esg:main into main
Reviewed-on: Shared/esg#8
2026-06-21 11:31:03 +03:30
2 changed files with 27 additions and 2 deletions

View File

@@ -1,6 +1,9 @@
# Application
PORT=8085
NODE_ENV=development
ESG_SMOKE_ENABLED=false
CLIENT_URL=https://apex.mic.co.ir/esg
BASE_URL_PROD=
# MongoDB
MONGODB_URI=mongodb://localhost:27017/inquiry-gateway
@@ -18,6 +21,13 @@ BCRYPT_SALT_ROUNDS=12
THROTTLE_TTL=60
THROTTLE_LIMIT=100
# Route outbound provider API calls through an SSH tunnel (Termius dynamic/SOCKS forward)
# Use socks5h so DNS resolves on the remote server. Leave empty for direct access.
OUTBOUND_PROXY=socks5h://127.0.0.1:6565
# Log every outbound provider HTTP call (request URL, status, response body preview)
OUTBOUND_HTTP_DEBUG=true
# Provider routing (per inquiry type)
PERSON_DEFAULT_PROVIDER=PARSIAN
PERSON_FALLBACK_ENABLED=true

View File

@@ -59,13 +59,28 @@ async function bootstrap(): Promise<void> {
}),
);
const swaggerConfig = new DocumentBuilder()
const baseUrlProd = process.env.BASE_URL_PROD;
const clientUrl = process.env.CLIENT_URL;
const documentBuilder = new DocumentBuilder()
.setTitle('External Services Gateway')
.setDescription(
'Unified gateway for external inquiry providers with JWT authentication, RBAC, ' +
'per-user inquiry access, audit logging, and normalized inquiry responses.',
)
.setVersion('1.0')
.addServer("http://localhost:8085")
.addServer("http://192.168.20.22:8085");
if (clientUrl) {
documentBuilder.addServer(clientUrl);
}
if (baseUrlProd) {
documentBuilder.addServer(baseUrlProd);
}
const swaggerConfig = documentBuilder
.addBearerAuth(
{ type: 'http', scheme: 'bearer', bearerFormat: 'JWT', in: 'header' },
'bearer',