0.2.0 • Published 6 years ago

fastify-no-sniff v0.2.0

Weekly downloads
16
License
MIT
Repository
github
Last release
6 years ago

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