-
-
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
Can't get setGlobalPrefix value in adapter #14362
Comments
I didn't get if this is a bug report or a feature request |
Why do you need that? |
The middleware in express way not work well, it has other aproach. And for that, I need to make some custom createMiddlewareFactory, because the path of middlewares already contains here the setGlobalPrefix and i need it to compare path
|
And here
Now all work well but i hardcode that prefix |
Not only I need, you also need it for example you pass extra param in |
Here you (are forced to) pass prefix but it is not needed (may be because other adapter need it, fastyfy I don't see it)
|
a ha ha ha, nice in adapter i can do
or in setErrorHandler |
Is there an existing issue for this?
Current behavior
In nest-application
await this.httpAdapter?.init();
no options is passed from nest app to adapterMinimum reproduction code
https://github.com/nestjs/nest
Steps to reproduce
No response
Expected behavior
To pass to adapter
this.config
and in adapter will be able to call
this.config.getGlobalPrefix();
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
latest
Packages versions
latest
Node.js version
20
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: