{"_id":"dont-sniff-mimetype","_rev":"8-0867658c1800a6cf87cd3f97c9211954","name":"dont-sniff-mimetype","description":"Middleware to prevent mimetype from being sniffed","dist-tags":{"latest":"1.1.0"},"versions":{"0.1.0":{"name":"dont-sniff-mimetype","author":{"name":"Adam Baldwin","email":"baldwin@andyet.net","url":"http://andyet.net/team/baldwin"},"contributors":[{"name":"Evan Hahn","email":"me@evanhahn.com","url":"http://evanhahn.com"}],"description":"Middleware to prevent mimetype from being sniffed","version":"0.1.0","keywords":["helmet","security","express","connect","mimetype","x-content-type-options"],"repository":{"type":"git","url":"git://github.com/helmetjs/dont-sniff-mimetype.git"},"bugs":{"url":"https://github.com/helmetjs/dont-sniff-mimetype/issues"},"scripts":{"test":"mocha"},"devDependencies":{"connect":"^3.3.1","mocha":"^2.0.1","supertest":"^0.14.0"},"gitHead":"91231c8b4ba5a197219fcf599c08d1b79e57e3c6","homepage":"https://github.com/helmetjs/dont-sniff-mimetype","_id":"dont-sniff-mimetype@0.1.0","_shasum":"c62413dc7e4149d548b2c728ec370640b3058ca8","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"evanhahn","email":"me@evanhahn.com"},"maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"dist":{"shasum":"c62413dc7e4149d548b2c728ec370640b3058ca8","tarball":"https://registry.npmjs.org/dont-sniff-mimetype/-/dont-sniff-mimetype-0.1.0.tgz","integrity":"sha512-E7NtnHU7K6jK3Kr/hJs5JjG4yIQfl6zcwWxxNtl2fpsvpFred3exaybu81Cd2hpEHfmLIrj3aL1Ro591s45txQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE5mRJlicvyKt7ztQV5Mdn/IKWQNJ2uiWLsuZqtuQ7CsAiBMesTiGD4jBX3a7zwPG6xmsFmfK2AmKO/avIUCfM+sMQ=="}]},"directories":{}},"1.0.0":{"name":"dont-sniff-mimetype","author":{"name":"Adam Baldwin","email":"baldwin@andyet.net","url":"http://andyet.net/team/baldwin"},"contributors":[{"name":"Evan Hahn","email":"me@evanhahn.com","url":"http://evanhahn.com"}],"description":"Middleware to prevent mimetype from being sniffed","version":"1.0.0","license":"MIT","keywords":["helmet","security","express","connect","mimetype","x-content-type-options"],"repository":{"type":"git","url":"git://github.com/helmetjs/dont-sniff-mimetype.git"},"bugs":{"url":"https://github.com/helmetjs/dont-sniff-mimetype/issues"},"scripts":{"test":"standard && mocha"},"devDependencies":{"connect":"^3.4.0","mocha":"^2.3.4","standard":"^5.4.1","supertest":"^1.1.0"},"standard":{"globals":["describe","it"]},"gitHead":"c72512de442885f5fd69ff35d181a59dea177929","homepage":"https://github.com/helmetjs/dont-sniff-mimetype#readme","_id":"dont-sniff-mimetype@1.0.0","_shasum":"5932890dc9f4e2f19e5eb02a20026e5e5efc8f58","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.3.0","_npmUser":{"name":"evanhahn","email":"me@evanhahn.com"},"maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"dist":{"shasum":"5932890dc9f4e2f19e5eb02a20026e5e5efc8f58","tarball":"https://registry.npmjs.org/dont-sniff-mimetype/-/dont-sniff-mimetype-1.0.0.tgz","integrity":"sha512-omUYb107RqZnRg6uTIv5bHVPJKR9jcdPd20XF11gwd9MCHh7LxW2/MdCU8qYnv0HlP1zW+sW4sSlIss46zOicw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDa/5nqImvDhWMOMUD732ITT8dHfGC3EJw57l220OHWeAIgXwhhzDOmt2zJSvdcCqMITGOnKM91k02jV1C3xc4q35Y="}]},"directories":{}},"1.1.0":{"name":"dont-sniff-mimetype","author":{"name":"Adam Baldwin","email":"adam@npmjs.com","url":"https://evilpacket.net"},"contributors":[{"name":"Evan Hahn","email":"me@evanhahn.com","url":"https://evanhahn.com"}],"description":"Middleware to prevent mimetype from being sniffed","version":"1.1.0","license":"MIT","keywords":["helmet","security","express","connect","mimetype","x-content-type-options"],"homepage":"https://helmetjs.github.io/docs/dont-sniff-mimetype","repository":{"type":"git","url":"git://github.com/helmetjs/dont-sniff-mimetype.git"},"bugs":{"url":"https://github.com/helmetjs/dont-sniff-mimetype/issues","email":"me@evanhahn.com"},"engines":{"node":">=4.0.0"},"scripts":{"pretest":"npm run lint","prepublishOnly":"npm run build","lint":"eslint --fix '**/*.ts'","test":"jest --config test/jest-config.json","clean":"rm -rf dist","build":"npm run clean && tsc"},"main":"./dist/index.js","typings":"./dist/index.d.ts","devDependencies":{"@types/connect":"^3.4.32","@types/jest":"^24.0.12","@types/supertest":"^2.0.7","@typescript-eslint/eslint-plugin":"^1.8.0","@typescript-eslint/parser":"^1.8.0","connect":"^3.6.6","eslint":"^5.16.0","eslint-config-helmet":"^0.2.0","jest":"^24.8.0","supertest":"^4.0.2","ts-jest":"^24.0.2","typescript":"^3.4.5"},"gitHead":"8f84846be05a48c1a5123123bbb120f7fb7a0f26","_id":"dont-sniff-mimetype@1.1.0","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ZjI4zqTaxveH2/tTlzS1wFp+7ncxNZaIEWYg3lzZRHkKf5zPT/MnEG6WL0BhHMJUabkh8GeU5NL5j+rEUCb7Ug==","shasum":"c7d0427f8bcb095762751252af59d148b0a623b2","tarball":"https://registry.npmjs.org/dont-sniff-mimetype/-/dont-sniff-mimetype-1.1.0.tgz","fileCount":6,"unpackedSize":4973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1tmBCRA9TVsSAnZWagAADIEP/3o9gNkkyVsDxDx0Q1k6\nJhR6k5yl+RyF++zzS00R/BtojYTNtoSVYu35va/qFobaLLMQAp7CmA3+d9Qh\nM5LWiC/Jc+y43w+K5xG2VupznwdGbiEUi3DboObggiFl7YKQaPK2Ty7oRhww\nM9PXWATtosP+6w1+U0FaZ5NE8w3o7w/1UN2YR8Fljw6cshNZBNJNX0aIkOUD\n0SvPXDkwf/vKxJfhPed552jrMpRA374KImCtKtljF8GcL/McTZh9dS//Z1EV\n6lkinVkspaLJH28SSt+FITfcoj9Vksg4buamWd0EbgeoIV1sK+uCt1pUIU7e\npBUImEbSzX11osy6hfPdjO/ld6lFvZz8tujytwsgqrdVO7n/nXmCF/vURTIs\nkqhICHahxXElGjqqHN9piYptmwWr5q7iaBMNqtGRqBQv8WXiLFbfg24fJ7H4\nzCci4QlMgN3wEtPBBhjYmvCtE4KZibYDI8qoSisi1T2e52V7mOXcZMkbLSM9\nYpnEG8pNwXe3CzSK0dB30+cD3J//GJK+KULDuVh8We3TEGXVTu91v7LHGauJ\ndvfFNTezSQkqRUtiTgDPDoiCi8KaUU2jfoVf0Biv7qrteW/XmEzmfdaunFeo\n+bnKhsGoM9L+8rGHEssAqB4jlPIFiZRwlSN7hASvfPMoVg+6Js1CUbhmNSEZ\nc049\r\n=YUzC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHGQSdf6dTolE8i30H+2NXazci5gy3Do6xK78s3Sy7nvAiEAkeXpTWTZHwiT8ObcZn1xx9l03m4od9r3tkGMVpa1WxM="}]},"maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"_npmUser":{"name":"evanhahn","email":"me@evanhahn.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dont-sniff-mimetype_1.1.0_1557584256412_0.4551746897174491"},"_hasShrinkwrap":false}},"readme":"\"Don't infer the MIME type\" middleware\n======================================\n[![Build Status](https://travis-ci.org/helmetjs/dont-sniff-mimetype.svg?branch=master)](https://travis-ci.org/helmetjs/dont-sniff-mimetype)\n\nSome browsers will try to \"sniff\" mimetypes. For example, if my server serves *file.txt* with a *text/plain* content-type, some browsers can still run that file with `<script src=\"file.txt\"></script>`. Many browsers will allow *file.js* to be run even if the content-type isn't for JavaScript.\n\nBrowsers' same-origin policies generally prevent remote resources from being loaded dangerously, but vulnerabilities in web browsers can cause this to be abused. Some browsers, like [Chrome](https://developers.google.com/web/updates/2018/07/site-isolation), will further isolate memory if the `X-Content-Type-Options` header is seen.\n\nThere are [some other vulnerabilities](http://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/), too.\n\nThis middleware prevents Chrome, Opera 13+, IE 8+ and [Firefox 50+](https://bugzilla.mozilla.org/show_bug.cgi?id=471020) from doing this sniffing. The following example sets the `X-Content-Type-Options` header to its only option, `nosniff`:\n\n```javascript\nconst nosniff = require('dont-sniff-mimetype')\napp.use(nosniff())\n```\n\n[MSDN has a good description](http://msdn.microsoft.com/en-us/library/gg622941%28v=vs.85%29.aspx) of how browsers behave when this header is sent.\n","maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"time":{"modified":"2022-06-15T22:02:37.102Z","created":"2014-10-28T14:43:00.874Z","0.1.0":"2014-10-28T14:43:00.874Z","1.0.0":"2015-12-18T22:31:27.547Z","1.1.0":"2019-05-11T14:17:36.566Z"},"homepage":"https://helmetjs.github.io/docs/dont-sniff-mimetype","keywords":["helmet","security","express","connect","mimetype","x-content-type-options"],"repository":{"type":"git","url":"git://github.com/helmetjs/dont-sniff-mimetype.git"},"contributors":[{"name":"Evan Hahn","email":"me@evanhahn.com","url":"https://evanhahn.com"}],"author":{"name":"Adam Baldwin","email":"adam@npmjs.com","url":"https://evilpacket.net"},"bugs":{"url":"https://github.com/helmetjs/dont-sniff-mimetype/issues","email":"me@evanhahn.com"},"readmeFilename":"README.md","license":"MIT","users":{"hugovila":true}}