helmet
noun
say it: “HEL-mit” /ˈhɛlmɪt/
An Express package that adds protective security headers to every response a server sends.
What does helmet do in an Express app?
helmet is an Express middleware package that adds a set of security headers to every response, such as one that stops browsers from guessing a file's type, and removes the X-Powered-By header that announces Express.
import helmet from "helmet";
app.use(helmet());
// every response now carries headers such as
// X-Content-Type-Options: nosniff
In a sentence
- “After adding helmet, the X-Powered-By: Express header was gone from every answer.”
- “One line, app.use(helmet()), gave the coffee club API a dozen security headers.”
Level: Journeyman · More Node.js terms at this level
Updated