-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
nestjs/core@8.4.1 breaks :param in globalPrefix #9776
Comments
The problematic code stems from the middleware-module.ts file of this commit 1ae72e1. Using this knowledge I changed the code to apply my middleware from |
Would you like to create a PR for this issue? |
@kamilmysliwiec |
In my humble opinion, the problem is that the meaning of Before this commit, the effect is equivalent to After this commit, the effect is equivalent to So if the golbal prefix contains |
Has anyone picked it up can I try to give it a shot? |
Let's track this here #10390 |
Is there an existing issue for this?
Current behavior
When setting a parameter in
app.setGlobalPrefix(':prefix')
it is only available in a controller and not in a middleware.In version 8.4.0 it works in the middleware too. You can test it if you set 8.4.0 manually in the package.json.
Minimum reproduction code
https://github.com/minju-s/nestjs-global-prefix-test
Steps to reproduce
npm ci
npm start
http://localhost:3000/test/app
undefined
Expected behavior
npm ci
npm start
http://localhost:3000/test/app
test
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 package
No response
NestJS version
8.4.1
Packages versions
Node.js version
16.15.1
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: