Helmet Middleware

Helmet.js is a Express.js middleware that improves security by safeguarding HTTP headers returned by a Node.js app

Use helmet in a Express app like this:

server.js
const express = require("express")
const app = express()
 
// setting "Referrer-Policy" to "no-referrer"
app.use(
  helmet.hsts({
    // 60 days
    maxAge: 86400,
    // removing the "includeSubDomains" option
    includeSubDomains: false,
  })
 )`