GitXplorerGitXplorer
p

fastify-no-sniff

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
fa4cf817ef3ddcad7b401162bb1aa0058d6c1893

test: update test case

ppoppinlp committed 7 years ago
Unverified
a0904ccd5bb456a41ef44d483ab21c3c07178de7

0.2.0

ppoppinlp committed 7 years ago
Unverified
8d7284bc8e07e618184d928c65193451e9e9b245

feat: add test case, add code coverage, add benchmark

ppoppinlp committed 7 years ago
Unverified
4db5157e8855497bcad0cf1a5297eabf6d27b1bb

fix: fix README

ppoppinlp committed 7 years ago
Unverified
591d0725a6f7294b16cae6f82aba03907a6f10c7

fix: fix main code

ppoppinlp committed 7 years ago
Unverified
ab1d3401b173930cfa018c7654c2d5a2a958cec7

feat: init version

ppoppinlp committed 7 years ago

README

The README file for this repository.

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. :)

Difference

This plugin has passed all dont-sniff-mimetype test cases. And no difference in options.

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