fastify-no-sniff

0.2.0 • Public • Published

fastify-no-sniff

Build Status Code coverage Code style Dependency Status Dev Dependency Status NPM version NPM downloads NPM license

Fastify plugin to prevent mimetype from being sniffed

Why?

You may know dont-sniff-mimetype as a dont-sniff-mimetype middleware used in helmet. And you could use it as a middleware in fastify also. So why i made this plugin?

You may find the reason in benchmark result and wish you like it. :)

Install

Via npm:

npm i fastify-no-sniff

Via yarn:

yarn add fastify-no-sniff

Usage

const fastify = require('fastify');
const fastifyNoSniff = require('fastify-no-sniff');
 
const app = fastify();
app.register(fastifyNoSniff);
 
app.listen(3000, err => {
  if (err) throw err;
});

Changelog

  • 0.2.0:
    • Add test case
    • Add code coverage
    • Add benchmarks
  • 0.1.1:
    • Init version

/fastify-no-sniff/

    Package Sidebar

    Install

    npm i fastify-no-sniff

    Weekly Downloads

    4

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    5.12 kB

    Total Files

    4

    Last publish

    Collaborators

    • poppinl