Middleware is not triggered when pass controller to consumer's forRoutes() #11833
Closed
5 of 15 tasks
Labels
needs triage
This issue has not been looked into
Is there an existing issue for this?
Current behavior
this won't trigger the AuthMiddleware
this will trigger the AuthMiddleware
Minimum reproduction code
https://github.com/ianzone/nest-issue
Steps to reproduce
Expected behavior
AuthMiddleware get triggered and console logs out 'AuthMiddleware invoked...'
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
No response
Packages versions
[System Information]
OS Version : Linux 5.15
NodeJS Version : v18.16.0
PNPM Version : 8.6.2
[Nest CLI]
Nest CLI Version : 10.0.2
[Nest Platform Information]
platform-fastify version : 10.0.1
mapped-types version : 0.0.1
schematics version : 10.0.1
testing version : 10.0.1
common version : 10.0.1
core version : 10.0.1
cli version : 10.0.2
Node.js version
v18.16.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: