Explaining my code below: There are two middleware AuthenticationMiddleware, RequestFilterMiddleware which intervene ALL request methods.
My question is how to make RequestFilterMiddleware
middleware only for GET method and AuthenticationMiddleware
middleware for ALL request methods
app.module.ts
export class AppModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply(AuthenticationMiddleware, RequestFilterMiddleware)
.forRoutes({ path: '/**', method: RequestMethod.ALL });
}
}