You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fastify middleware doesn't apply correctly when matched against routes registered via a Fastify plugin. #11802
When the configured routes for the endpoint is being reached, it should trigger the middleware provided.
Package
I don't know. Or some 3rd-party 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 (see below)
Other package
No response
NestJS version
10.0.0
Packages versions
[System Information]
OS Version : macOS Unknown
NodeJS Version : v16.20.0
YARN Version : 1.22.19
[Nest CLI]
Nest CLI Version : 10.0.1
[Nest Platform Information]
platform-express version : 10.0.0
platform-fastify version : 10.0.0
schematics version : 10.0.1
testing version : 10.0.0
bullmq version : 1.1.0
common version : 10.0.0
core version : 10.0.0
cli version : 10.0.1
Interesting thing to notice: when reaching to an not existing url, the middleware does register (I guess it falls back to the NestJS route handler?) for example https://localhost:3000/queues/non-exisiting-route
Reacted by Yiheng, tjhiggins, Marek Suscak, Number16BusShelter and Cole Weinman
Activity
DennisSnijder commentedon Jun 15, 2023
Might be related to #11572 ?
mareksuscak commentedon Feb 19, 2024
@kamilmysliwiec is there any official recommendation as to how to get middleware to run before the routes registered with a plugin?
freebeego commentedon Jun 7, 2024
?
rafakwolf commentedon Nov 30, 2024
Same problem here
Hardanish-Singh commentedon Jan 8, 2026
Same issue
fix(fastify): fix middleware route matching with params
kamilmysliwiec commentedon Jul 23, 2026
let's track this here #17350