Express 5 · Middleware

Set security headers

Add common protective HTTP headers.

npm install helmet

import helmet from "helmet";
app.use(helmet());

Official Express 5 documentation

More middleware commands

All middleware commands · Express 5 cheatsheet

Was this page helpful?