I want to disable X-Powered-By in nestjs like the following, but it does not work.
main.ts:
async function bootstrap() {
const logger = new Logger('bootstrap')
const app = await NestFactory.create<NestExpressApplication>(AppModule);
app.disable('X-Powered-By') // this line
...
const PORT = process.env.PORT
await app.listen(PORT);
logger.log(`Application is start on port : ${PORT}`)
}
bootstrap();
After disabling the X-Powered-By header, in the next requests, that X-Powered-By header still exists.
Where am I doing something wrong?