-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consumer.apply(middleware).forRoutes(pathString) not working #692
Comments
Hey @bojidaryovchev, |
Fixed in |
@kamilmysliwiec I'm seeing this issue again in This works: export class AppModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer.apply(LoggerMiddleware).forRoutes(MyController);
}
} But this doesn't: export class AppModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer.apply(LoggerMiddleware).forRoutes('*');
}
} |
@felangel could you please create a separate issue? :) |
@kamilmysliwiec thanks for the quick reply! I saw the issue was fixed in the latest release 👍🎉💯 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm submitting a...
Current behavior
in the .module - consumer.apply([middlewares]).forRoutes('get/stuff');
At the moment, the middlewares don't get invoked when we pass a single route as a string, it only works with a controller.. So we are unable to configure middlewares for a certain route..
Expected behavior
The middlewares should be called before the controller.
The text was updated successfully, but these errors were encountered: