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()