Express Production Setup - 4 | HELMET
Helmet helps secure Express apps by setting HTTP response headers.
it will remove all header from express app like
X-Powered-By
: express we can remove using
express.remove("x-powered-by");
but it's make it easy
* also help
XSS attacks
index.js
import express from "express";
import helmet from "helmet";
const app = express();
// Use Helmet!
app.use(helmet());
app.get("/", (req, res) => {
res.send("Hello world!");
});
app.listen(8000);
Comments
Post a Comment