diff --git a/packages/nestlogged-fastify/src/override-patched.ts b/packages/nestlogged-fastify/src/override-patched.ts index cb42f27..c2d9149 100644 --- a/packages/nestlogged-fastify/src/override-patched.ts +++ b/packages/nestlogged-fastify/src/override-patched.ts @@ -116,8 +116,11 @@ export function overrideBuild, R>( const context = args[0] as ExecutionContext; if (context.getType() === 'http') { const req = context.switchToHttp().getRequest(); - route = /* supporting FastifyRequest */ req.raw ? req.raw.url : req.url; + route = req.raw.url; } + } else if (type === 'middleware') { + const req = args[0]; + route = req.originalUrl; } // Start Log