@fastify/helmet Logo

@fastify/helmet

0
Free
Visit Website

Important security headers for Fastify. It is a tiny wrapper around helmet. Usage: Simply require this plugin, and the basic security headers will be set. const fastify = require('fastify')() const helmet = require('@fastify/helmet') fastify.register( helmet, // Example disables the `contentSecurityPolicy` middleware but keeps the rest. { contentSecurityPolicy: false } ) fastify.listen({ port: 3000 }, err => { if (err) throw err }) How it works: @fastify/helmet is a tiny wrapper around helmet that adds an 'onRequest' hook and a reply.helmet decorator. It accepts the same options as helmet, and you can see more in the helmet documentation. Apply Helmet to all your application routes: By passing { global: true } into the options, @fastify/helmet allows you to register Helmet for all your application routes by default. If you want a more granular control on how to apply Helmet to your application you can choose to disable it on a global scope by passing { global: false } to the options. By default, this option is set to true. Example - enable @fastify/helmet globally: fastify.register(helmet) // or fastify.register(helmet, { global: true })

FEATURES

ALTERNATIVES

Automatic tool for pentesting XSS attacks against different applications

A deliberately vulnerable modern day app with lots of DOM related bugs

Make any application debuggable on a device.

Search engine for open-source Git repositories with advanced features like case sensitivity and regular expressions.

JavaScript parser, minifier, compressor, and beautifier toolkit with simplified API and CLI.

An API security platform that provides automated discovery, documentation, and continuous security testing throughout the API lifecycle.

Python-based web server framework for setting up fake web servers and services with precise data responses.

IronBee is an open source project building a universal web application security sensor.

PINNED