Closed alexphamhp closed 1 year ago
The middleware is mounted to "*"
internally with the mount: true
and maybe happens too late in the process when both prefix and versioning are involved. I must admit that I haven't tested the library with versioning.
Could you test with mounting the middleware manually, or using the interceptor instead?
If you can, please provide me with a repository with a minimal reproduction of the issue that I can inspect locally.
Thanks @Papooch for the quick reply Yes, I fixed it by using your mounting the middleware manually I put the middleware in my bootstrap function and it worked
I agree that the mounting middleware happens too late in the process when both prefix and versioning are involved
I'm sorry, what I can public is just that above sample code :sweat_smile:
Thanks for the confirmation, I've added a short note about it to the docs.
I just got this weird error when use your library in Nestjs I set up it in my AppModule like below :
In main.ts I use prefix for API version
Steps I did :
/api/v1
=> Cls Middleware is not triggered ~ there is no log "calling cls middleware"But when I use that prefix, I see the log and also the correlationId is set in my exception response :sweat_smile: It seems like the
mount: true
does not work like it is supposed to do :thinking: