@react-foundry/fastify-harden
v0.1.7
Published
Fastify plugin for extra cyber-security hardening.
Readme
React Foundry - Fastify Harden
Fastify plugin for extra cyber-security hardening.
This adds extra HTTP headers to tell the browser to run in a stricter fashion in order to prevent a variety of exploits. It also censors error messages on any Internal Server Errors that occur in production (they can still be found in the logs.
Using this package
First install the package into your project:
npm install -S @react-foundry/fastify-hardenThen use it in your code as follows:
import Fastify from 'fastify';
import fastifyHarden from '@react-foundry/fastify-harden';
const httpd = Fastify({});
await httpd.register(fastifyHarden, {
});
await httpd.listen({ port: 8080 });Working on this package
Before working on this package you must install its dependencies using the following command:
pnpm installBuilding
Build the package by compiling the source code.
npm run buildClean-up
Remove any previously built files.
npm run clean