Hello, in my main code of my app, with the use of express, I'm trying to remove the "x-powered-by" header, and I've used both
app.disable("x-powered-by")
how much
app.set("x-powered-by", false)
In addition, I've already tried using the helmet module.
But, no way comes up and the header continues to appear in the requests.
Here is the structure of my code:
const express = require('express'),
app = express(),
http = require('http'),
cors = require('cors'),
helmet = require('helmet'),
app.set('x-powered-by', false);
...
app.use(cors());
app.use(helmet());
...
http
.createServer(app)
.listen(port, () => {
console.log('running in port ${port}');
});