deepkit-framework
deepkit-framework copied to clipboard
Middlewares are not applied when specifying multiple matching routes
Middlewares are not applied when specifying multiple matching routes:
This won't work:
middlewares: [
httpMiddleware.for(SomeMiddleware).forRoutes({
path: '/pathA',
},
{
path: 'pathB',
}),
]
While this works:
middlewares: [
httpMiddleware.for(SomeMiddleware).forRoutes({
path: '/pathA',
}),
httpMiddleware.for(SomeMiddleware).forRoutes({
path: 'pathB',
}),
]
Haven't found the related code yet but I guess it's similar cause to this issue (and logic is used instead of or logic in matching)
https://github.com/deepkit/deepkit-framework/issues/284