From ec51ca7815c9b823af4bb22656077f545a0f1e14 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Thu, 7 May 2026 22:09:32 +0100 Subject: [PATCH] fix request ip --- apps/server/src/main.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/server/src/main.ts b/apps/server/src/main.ts index 7e82b6d92..877411223 100644 --- a/apps/server/src/main.ts +++ b/apps/server/src/main.ts @@ -50,6 +50,14 @@ async function bootstrap() { await app.register(fastifyMultipart); await app.register(fastifyCookie); + app + .getHttpAdapter() + .getInstance() + .addHook('onRequest', (request, _reply, done) => { + (request.raw as any).ip = request.ip; + done(); + }); + app .getHttpAdapter() .getInstance()