Don't Sniff Mimetype Middleware

JSON →
library 1.1.0 ·javascript
verified May 27, 2026

This package provides a small, focused Express/Connect middleware designed to set the `X-Content-Type-Options` HTTP header to `nosniff`. This header is a crucial client-side security measure that prevents browsers from "sniffing" or inferring the MIME type of a response, thereby enforcing the `Content-Type` header explicitly sent by the server. Without it, browsers might execute files (like HTML or JavaScript) that are incorrectly served with a generic MIME type (e.g., `text/plain`), leading to cross-site scripting (XSS) or other content-based attacks. The current stable version is 1.1.0, which was last published in 2019, indicating a highly mature and stable, but infrequently updated, codebase. It is a standalone component of the broader Helmet.js suite, which includes this functionality by default. Its key differentiator is offering granular control over this specific security header without deploying the entire Helmet.js bundle.

total hits 14
actors 6 distinct systems
last hit 1d ago human
MetaBot
4
GPTBot
2
Script
1
Search engines
2
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇪🇸 Spain · 🇫🇷 France