-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
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
- goto
http://localhost:3000/test/app
- console outputs
undefined
Expected behavior
npm ci
npm start
- goto
http://localhost:3000/test/app
- console outputs
test
Package
- I don't know. Or some 3rd-party 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 (see below)
Other package
No response
NestJS version
8.4.1
Packages versions
"@nestjs/core": "8.4.1"
Node.js version
16.15.1
In which operating systems have you tested?
- macOS
- Windows
- Linux
Other
No response
micalevisk