-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
-
-
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
Nest 6 and app.disable('x-powered-by') #1788
Comments
const app = await NestFactory.create<NestExpressApplication>(AppModule);
app.disable('x-powered-by');
|
Thanks. I think the migration guide could use this information as well. |
@kamilmysliwiec interestingly when I tried your suggestion with nest 6.2.4, I am unable to properly remove I have tried adding both casings as: but api is still responding with The only thing that worked is overwriting it with custom string.
|
@sajidali you can also create an express instance and configure it as you want, and then pass it back to the NestFactory 😃 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm submitting a...
Current behavior
With Nest 6, what is the proper way to disable the
x-powered-by: Express
header? It seems likedisable(...)
has been removed.I don't see any relevant information in the v6 documentation about this particular change.
What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: