Securing an Express.js app with Helmet
Is it very important to secure your Express.js app. With Helmet, you can do this very easily. Helmet will set appropriate HTTP headers to prevent most vulnerabilities.
Use Helmet
Helmet can help protect your app from some well-known web vulnerabilities by setting HTTP headers appropriately.
Install it with:
npm install helmetAnd add this to your code:
const helmet = require('helmet')
app.use(helmet())
And that's it!