@wnodex/helmet
v0.2.2
Published
A wnodex middleware that integrates Helmet to secure your application by setting various HTTP headers.
Maintainers
Readme
@wnodex/helmet
wnodex helmet middleware
Part of the wnodex ecosystem, this package provides security-focused middleware using Helmet.
About
@wnodex/helmet integrates the helmet middleware to help secure your wnodex application by setting various HTTP headers. It provides sensible defaults to protect against common web vulnerabilities.
Features
- Simple integration with
wnodex. - Sets important security headers like
Content-Security-Policy,Strict-Transport-Security, and more. - Configurable to disable or customize specific headers.
- Based on the popular
helmetlibrary.
Why use it?
Security is a primary concern for any web application. @wnodex/helmet makes it easy to apply a baseline of security measures with zero configuration. By managing it within wnodex, you ensure that security headers are applied consistently across your application.
Installation
You can install the package using your favorite package manager:
pnpm
pnpm add @wnodex/helmetnpm
npm install @wnodex/helmetyarn
yarn add @wnodex/helmetbun
bun add @wnodex/helmetUsage
@wnodex/helmet is disabled by default. To enable it with default settings, set helmet: true. You can also pass a configuration object to customize its behavior.
import { Wnodex } from 'wnodex';
// Example: Enable Helmet with default settings
const server = new Wnodex({
helmet: true,
});
// Example: Customize Helmet options
const serverWithCustomHelmet = new Wnodex({
helmet: {
contentSecurityPolicy: false, // Disable a specific middleware
},
});
server.start();The options object is passed directly to the helmet library.
License
This project is licensed under the MIT License.
Copyright (c) 2026 Davide Di Criscito
For the full details, see the LICENSE file.
