From 63e73ecfaa3943305878aa5cbdf91a47d30a1873 Mon Sep 17 00:00:00 2001 From: WangDL Date: Fri, 22 May 2026 11:20:54 +0800 Subject: [PATCH] fix: trust proxy for real client IP from Nginx --- src/main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.ts b/src/main.ts index 0eb285c..ed14af0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,6 +10,7 @@ async function bootstrap() { const configService = app.get(ConfigService); const isProduction = configService.get('app.nodeEnv') === 'production'; + app.set("trust proxy", 1); app.use(helmet()); app.setGlobalPrefix('api', { exclude: ['health', 'admin-api/(.*)', 'internal/(.*)'] });