Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. # Helmet
  2. [![npm version](https://badge.fury.io/js/helmet.svg)](https://badge.fury.io/js/helmet)
  3. [![npm dependency status](https://david-dm.org/helmetjs/helmet.svg)](https://david-dm.org/helmetjs/helmet)
  4. [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhelmetjs%2Fhelmet.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhelmetjs%2Fhelmet?ref=badge_shield)
  5. Helmet helps you secure your Express apps by setting various HTTP headers. _It's not a silver bullet_, but it can help!
  6. ## Quick start
  7. First, run `npm install helmet --save` for your app. Then, in an Express app:
  8. ```js
  9. const express = require("express");
  10. const helmet = require("helmet");
  11. const app = express();
  12. app.use(helmet());
  13. // ...
  14. ```
  15. ## How it works
  16. Helmet is [Connect](https://github.com/senchalabs/connect)-style middleware, which is compatible with frameworks like [Express](https://expressjs.com/). (If you need support for Koa, see [`koa-helmet`](https://github.com/venables/koa-helmet).)
  17. The top-level `helmet` function is a wrapper around 15 smaller middlewares, 11 of which are enabled by default.
  18. In other words, these two things are equivalent:
  19. ```js
  20. // This...
  21. app.use(helmet());
  22. // ...is equivalent to this:
  23. app.use(helmet.contentSecurityPolicy());
  24. app.use(helmet.dnsPrefetchControl());
  25. app.use(helmet.expectCt());
  26. app.use(helmet.frameguard());
  27. app.use(helmet.hidePoweredBy());
  28. app.use(helmet.hsts());
  29. app.use(helmet.ieNoOpen());
  30. app.use(helmet.noSniff());
  31. app.use(helmet.permittedCrossDomainPolicies());
  32. app.use(helmet.referrerPolicy());
  33. app.use(helmet.xssFilter());
  34. ```
  35. To set custom options for one of the middleware, add options like this:
  36. ```js
  37. // This sets custom options for the `referrerPolicy` middleware.
  38. app.use(
  39. helmet({
  40. referrerPolicy: { policy: "no-referrer" },
  41. })
  42. );
  43. ```
  44. You can also disable a middleware:
  45. ```js
  46. // This disables the `contentSecurityPolicy` middleware but keeps the rest.
  47. app.use(
  48. helmet({
  49. contentSecurityPolicy: false,
  50. })
  51. );
  52. ```
  53. ## Reference
  54. <details>
  55. <summary><code>helmet(options)</code></summary>
  56. Helmet is the top-level middleware for this module, including all 15 others.
  57. 11 of 15 middlewares are included by default. `crossOriginEmbedderPolicy`, `crossOriginOpenerPolicy`, `crossOriginResourcePolicy`, and `originAgentCluster` are not included by default. They must be explicitly enabled. They will be turned on by default in the next major version of Helmet.
  58. ```js
  59. // Includes all 11 middlewares
  60. app.use(helmet());
  61. ```
  62. If you want to disable one, pass options to `helmet`. For example, to disable `frameguard`:
  63. ```js
  64. // Includes 10 middlewares, skipping `helmet.frameguard`
  65. app.use(
  66. helmet({
  67. frameguard: false,
  68. })
  69. );
  70. ```
  71. Most of the middlewares have options, which are documented in more detail below. For example, to pass `{ action: "deny" }` to `frameguard`:
  72. ```js
  73. // Includes all 11 middlewares, setting an option for `helmet.frameguard`
  74. app.use(
  75. helmet({
  76. frameguard: {
  77. action: "deny",
  78. },
  79. })
  80. );
  81. ```
  82. Each middleware's name is listed below.
  83. </details>
  84. <details>
  85. <summary><code>helmet.contentSecurityPolicy(options)</code></summary>
  86. `helmet.contentSecurityPolicy` sets the `Content-Security-Policy` header which helps mitigate cross-site scripting attacks, among other things. See [MDN's introductory article on Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
  87. This middleware performs very little validation. You should rely on CSP checkers like [CSP Evaluator](https://csp-evaluator.withgoogle.com/) instead.
  88. `options.directives` is an object. Each key is a directive name in camel case (such as `defaultSrc`) or kebab case (such as `default-src`). Each value is an iterable (usually an array) of strings or functions for that directive. If a function appears in the iterable, it will be called with the request and response. The `default-src` can be explicitly disabled by setting its value to `helmet.contentSecurityPolicy.dangerouslyDisableDefaultSrc`.
  89. `options.reportOnly` is a boolean, defaulting to `false`. If `true`, [the `Content-Security-Policy-Report-Only` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only) will be set instead.
  90. If no directives are supplied, the following policy is set (whitespace added for readability):
  91. default-src 'self';
  92. base-uri 'self';
  93. block-all-mixed-content;
  94. font-src 'self' https: data:;
  95. frame-ancestors 'self';
  96. img-src 'self' data:;
  97. object-src 'none';
  98. script-src 'self';
  99. script-src-attr 'none';
  100. style-src 'self' https: 'unsafe-inline';
  101. upgrade-insecure-requests
  102. You can use this default with the `options.useDefaults` option. `options.useDefaults` is `false` by default, but will be `true` in the next major version of Helmet.
  103. You can also get the default directives object with `helmet.contentSecurityPolicy.getDefaultDirectives()`.
  104. Examples:
  105. ```js
  106. // Sets all of the defaults, but overrides `script-src` and disables the default `style-src`
  107. app.use(
  108. helmet.contentSecurityPolicy({
  109. useDefaults: true,
  110. directives: {
  111. "script-src": ["'self'", "example.com"],
  112. "style-src": null,
  113. },
  114. })
  115. );
  116. // Sets "Content-Security-Policy: default-src 'self';script-src 'self' example.com;object-src 'none';upgrade-insecure-requests"
  117. app.use(
  118. helmet.contentSecurityPolicy({
  119. useDefaults: false,
  120. directives: {
  121. defaultSrc: ["'self'"],
  122. scriptSrc: ["'self'", "example.com"],
  123. objectSrc: ["'none'"],
  124. upgradeInsecureRequests: [],
  125. },
  126. })
  127. );
  128. // Sets the "Content-Security-Policy-Report-Only" header instead
  129. app.use(
  130. helmet.contentSecurityPolicy({
  131. useDefaults: true,
  132. directives: {
  133. /* ... */
  134. },
  135. reportOnly: true,
  136. })
  137. );
  138. // Sets the `script-src` directive to "'self' 'nonce-e33ccde670f149c1789b1e1e113b0916'" (or similar)
  139. app.use((req, res, next) => {
  140. res.locals.cspNonce = crypto.randomBytes(16).toString("hex");
  141. next();
  142. });
  143. app.use(
  144. helmet.contentSecurityPolicy({
  145. useDefaults: true,
  146. directives: {
  147. scriptSrc: ["'self'", (req, res) => `'nonce-${res.locals.cspNonce}'`],
  148. },
  149. })
  150. );
  151. // Sets "Content-Security-Policy: script-src 'self'"
  152. app.use(
  153. helmet.contentSecurityPolicy({
  154. useDefaults: false,
  155. directives: {
  156. "default-src": helmet.contentSecurityPolicy.dangerouslyDisableDefaultSrc,
  157. "script-src": ["'self'"],
  158. },
  159. })
  160. );
  161. ```
  162. You can install this module separately as `helmet-csp`.
  163. </details>
  164. <details>
  165. <summary><code>helmet.crossOriginEmbedderPolicy()</code></summary>
  166. `helmet.crossOriginEmbedderPolicy` sets the `Cross-Origin-Embedder-Policy` header to `require-corp`. See [MDN's article on this header](https://developer.cdn.mozilla.net/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy) for more.
  167. This middleware is not included when calling `helmet()` by default, and must be enabled explicitly. It will be enabled by default in the next major version of Helmet.
  168. Example usage with Helmet:
  169. ```js
  170. // Uses the default Helmet options and adds the `crossOriginEmbedderPolicy` middleware.
  171. // Sets "Cross-Origin-Embedder-Policy: require-corp"
  172. app.use(helmet({ crossOriginEmbedderPolicy: true }));
  173. ```
  174. Standalone example:
  175. ```js
  176. // Sets "Cross-Origin-Embedder-Policy: require-corp"
  177. app.use(helmet.crossOriginEmbedderPolicy());
  178. ```
  179. You can't install this module separately.
  180. </details>
  181. <details>
  182. <summary><code>helmet.crossOriginOpenerPolicy()</code></summary>
  183. `helmet.crossOriginOpenerPolicy` sets the `Cross-Origin-Opener-Policy` header. For more, see [MDN's article on this header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy).
  184. This middleware is not included when calling `helmet()` by default, and must be enabled explicitly. It will be enabled by default in the next major version of Helmet.
  185. Example usage with Helmet:
  186. ```js
  187. // Uses the default Helmet options and adds the `crossOriginOpenerPolicy` middleware.
  188. // Sets "Cross-Origin-Opener-Policy: same-origin"
  189. app.use(helmet({ crossOriginOpenerPolicy: true }));
  190. // Sets "Cross-Origin-Opener-Policy: same-origin-allow-popups"
  191. app.use(
  192. helmet({ crossOriginOpenerPolicy: { policy: "same-origin-allow-popups" } })
  193. );
  194. ```
  195. Standalone example:
  196. ```js
  197. // Sets "Cross-Origin-Opener-Policy: same-origin"
  198. app.use(helmet.crossOriginOpenerPolicy());
  199. // Sets "Cross-Origin-Opener-Policy: same-origin-allow-popups"
  200. app.use(helmet.crossOriginOpenerPolicy({ policy: "same-origin-allow-popups" }));
  201. // Sets "unsafe-none-Opener-Policy: unsafe-none"
  202. app.use(helmet.crossOriginOpenerPolicy({ policy: "unsafe-none" }));
  203. ```
  204. You can't install this module separately.
  205. </details>
  206. <details>
  207. <summary><code>helmet.crossOriginResourcePolicy()</code></summary>
  208. `helmet.crossOriginResourcePolicy` sets the `Cross-Origin-Resource-Policy` header. For more, see ["Consider deploying Cross-Origin Resource Policy](https://resourcepolicy.fyi/) and [MDN's article on this header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Resource-Policy).
  209. This middleware is not included when calling `helmet()` by default, and must be enabled explicitly. It will be enabled by default in the next major version of Helmet.
  210. Example usage with Helmet:
  211. ```js
  212. // Uses the default Helmet options and adds the `crossOriginResourcePolicy` middleware.
  213. // Sets "Cross-Origin-Resource-Policy: same-origin"
  214. app.use(helmet({ crossOriginResourcePolicy: true }));
  215. // Sets "Cross-Origin-Resource-Policy: same-site"
  216. app.use(helmet({ crossOriginResourcePolicy: { policy: "same-site" } }));
  217. ```
  218. Standalone example:
  219. ```js
  220. // Sets "Cross-Origin-Resource-Policy: same-origin"
  221. app.use(helmet.crossOriginResourcePolicy());
  222. // Sets "Cross-Origin-Resource-Policy: same-site"
  223. app.use(helmet.crossOriginResourcePolicy({ policy: "same-site" }));
  224. // Sets "Cross-Origin-Resource-Policy: cross-origin"
  225. app.use(helmet.crossOriginResourcePolicy({ policy: "cross-origin" }));
  226. ```
  227. You can install this module separately as `cross-origin-resource-policy`.
  228. </details>
  229. <details>
  230. <summary><code>helmet.expectCt(options)</code></summary>
  231. `helmet.expectCt` sets the `Expect-CT` header which helps mitigate misissued SSL certificates. See [MDN's article on Certificate Transparency](https://developer.mozilla.org/en-US/docs/Web/Security/Certificate_Transparency) and the [`Expect-CT` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect-CT) for more.
  232. `options.maxAge` is the number of seconds to expect Certificate Transparency. It defaults to `0`.
  233. `options.enforce` is a boolean. If `true`, the user agent (usually a browser) should refuse future connections that violate its Certificate Transparency policy. Defaults to `false`.
  234. `options.reportUri` is a string. If set, complying user agents will report Certificate Transparency failures to this URL. Unset by default.
  235. Examples:
  236. ```js
  237. // Sets "Expect-CT: max-age=86400"
  238. app.use(
  239. helmet.expectCt({
  240. maxAge: 86400,
  241. })
  242. );
  243. // Sets "Expect-CT: max-age=86400, enforce, report-uri="https://example.com/report"
  244. app.use(
  245. helmet.expectCt({
  246. maxAge: 86400,
  247. enforce: true,
  248. reportUri: "https://example.com/report",
  249. })
  250. );
  251. ```
  252. You can install this module separately as `expect-ct`.
  253. </details>
  254. <details>
  255. <summary><code>helmet.referrerPolicy(options)</code></summary>
  256. `helmet.referrerPolicy` sets the `Referrer-Policy` header which controls what information is set in [the `Referer` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer). See ["Referer header: privacy and security concerns"](https://developer.mozilla.org/en-US/docs/Web/Security/Referer_header:_privacy_and_security_concerns) and [the header's documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy) on MDN for more.
  257. `options.policy` is a string or array of strings representing the policy. If passed as an array, it will be joined with commas, which is useful when setting [a fallback policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#Specifying_a_fallback_policy). It defaults to `no-referrer`.
  258. Examples:
  259. ```js
  260. // Sets "Referrer-Policy: no-referrer"
  261. app.use(
  262. helmet.referrerPolicy({
  263. policy: "no-referrer",
  264. })
  265. );
  266. // Sets "Referrer-Policy: origin,unsafe-url"
  267. app.use(
  268. helmet.referrerPolicy({
  269. policy: ["origin", "unsafe-url"],
  270. })
  271. );
  272. ```
  273. You can install this module separately as `referrer-policy`.
  274. </details>
  275. <details>
  276. <summary><code>helmet.hsts(options)</code></summary>
  277. `helmet.hsts` sets the `Strict-Transport-Security` header which tells browsers to prefer HTTPS over insecure HTTP. See [the documentation on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security) for more.
  278. `options.maxAge` is the number of seconds browsers should remember to prefer HTTPS. If passed a non-integer, the value is rounded down. It defaults to `15552000`, which is 180 days.
  279. `options.includeSubDomains` is a boolean which dictates whether to include the `includeSubDomains` directive, which makes this policy extend to subdomains. It defaults to `true`.
  280. `options.preload` is a boolean. If true, it adds the `preload` directive, expressing intent to add your HSTS policy to browsers. See [the "Preloading Strict Transport Security" section on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security#Preloading_Strict_Transport_Security) for more. It defaults to `false`.
  281. Examples:
  282. ```js
  283. // Sets "Strict-Transport-Security: max-age=123456; includeSubDomains"
  284. app.use(
  285. helmet.hsts({
  286. maxAge: 123456,
  287. })
  288. );
  289. // Sets "Strict-Transport-Security: max-age=123456"
  290. app.use(
  291. helmet.hsts({
  292. maxAge: 123456,
  293. includeSubDomains: false,
  294. })
  295. );
  296. // Sets "Strict-Transport-Security: max-age=123456; includeSubDomains; preload"
  297. app.use(
  298. helmet.hsts({
  299. maxAge: 63072000,
  300. preload: true,
  301. })
  302. );
  303. ```
  304. You can install this module separately as `hsts`.
  305. </details>
  306. <details>
  307. <summary><code>helmet.noSniff()</code></summary>
  308. `helmet.noSniff` sets the `X-Content-Type-Options` header to `nosniff`. This mitigates [MIME type sniffing](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#MIME_sniffing) which can cause security vulnerabilities. See [documentation for this header on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options) for more.
  309. This middleware takes no options.
  310. Example:
  311. ```js
  312. // Sets "X-Content-Type-Options: nosniff"
  313. app.use(helmet.noSniff());
  314. ```
  315. You can install this module separately as `dont-sniff-mimetype`.
  316. </details>
  317. <details>
  318. <summary><code>helmet.originAgentCluster()</code></summary>
  319. `helmet.originAgentCluster` sets the `Origin-Agent-Cluster` header, which provides a mechanism to allow web applications to isolate their origins. Read more about it [in the spec](https://whatpr.org/html/6214/origin.html#origin-keyed-agent-clusters).
  320. This middleware is not included when calling `helmet()` by default, and must be enabled explicitly. It will be enabled by default in the next major version of Helmet.
  321. Example usage with Helmet:
  322. ```js
  323. // Uses the default Helmet options and adds the `originAgentCluster` middleware.
  324. // Sets "Origin-Agent-Cluster: ?1"
  325. app.use(helmet({ originAgentCluster: true }));
  326. ```
  327. Standalone example:
  328. ```js
  329. // Sets "Origin-Agent-Cluster: ?1"
  330. app.use(helmet.originAgentCluster());
  331. ```
  332. You can't install this module separately.
  333. </details>
  334. <details>
  335. <summary><code>helmet.dnsPrefetchControl(options)</code></summary>
  336. `helmet.dnsPrefetchControl` sets the `X-DNS-Prefetch-Control` header to help control DNS prefetching, which can improve user privacy at the expense of performance. See [documentation on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control) for more.
  337. `options.allow` is a boolean dictating whether to enable DNS prefetching. It defaults to `false`.
  338. Examples:
  339. ```js
  340. // Sets "X-DNS-Prefetch-Control: off"
  341. app.use(
  342. helmet.dnsPrefetchControl({
  343. allow: false,
  344. })
  345. );
  346. // Sets "X-DNS-Prefetch-Control: on"
  347. app.use(
  348. helmet.dnsPrefetchControl({
  349. allow: true,
  350. })
  351. );
  352. ```
  353. You can install this module separately as `dns-prefetch-control`.
  354. </details>
  355. <details>
  356. <summary><code>helmet.ieNoOpen()</code></summary>
  357. `helmet.ieNoOpen` sets the `X-Download-Options` header, which is specific to Internet Explorer 8. It forces potentially-unsafe downloads to be saved, mitigating execution of HTML in your site's context. For more, see [this old post on MSDN](https://docs.microsoft.com/en-us/archive/blogs/ie/ie8-security-part-v-comprehensive-protection).
  358. This middleware takes no options.
  359. Examples:
  360. ```js
  361. // Sets "X-Download-Options: noopen"
  362. app.use(helmet.ieNoOpen());
  363. ```
  364. You can install this module separately as `ienoopen`.
  365. </details>
  366. <details>
  367. <summary><code>helmet.frameguard(options)</code></summary>
  368. `helmet.frameguard` sets the `X-Frame-Options` header to help you mitigate [clickjacking attacks](https://en.wikipedia.org/wiki/Clickjacking). This header is superseded by [the `frame-ancestors` Content Security Policy directive](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors) but is still useful on old browsers. For more, see [the documentation on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options).
  369. `options.action` is a string that specifies which directive to use—either `DENY` or `SAMEORIGIN`. (A legacy directive, `ALLOW-FROM`, is not supported by this middleware. [Read more here.](https://github.com/helmetjs/helmet/wiki/How-to-use-X%E2%80%93Frame%E2%80%93Options's-%60ALLOW%E2%80%93FROM%60-directive)) It defaults to `SAMEORIGIN`.
  370. Examples:
  371. ```js
  372. // Sets "X-Frame-Options: DENY"
  373. app.use(
  374. helmet.frameguard({
  375. action: "deny",
  376. })
  377. );
  378. // Sets "X-Frame-Options: SAMEORIGIN"
  379. app.use(
  380. helmet.frameguard({
  381. action: "sameorigin",
  382. })
  383. );
  384. ```
  385. You can install this module separately as `frameguard`.
  386. </details>
  387. <details>
  388. <summary><code>helmet.permittedCrossDomainPolicies(options)</code></summary>
  389. `helmet.permittedCrossDomainPolicies` sets the `X-Permitted-Cross-Domain-Policies` header, which tells some clients (mostly Adobe products) your domain's policy for loading cross-domain content. See [the description on OWASP](https://owasp.org/www-project-secure-headers/) for more.
  390. `options.permittedPolicies` is a string that must be `"none"`, `"master-only"`, `"by-content-type"`, or `"all"`. It defaults to `"none"`.
  391. Examples:
  392. ```js
  393. // Sets "X-Permitted-Cross-Domain-Policies: none"
  394. app.use(
  395. helmet.permittedCrossDomainPolicies({
  396. permittedPolicies: "none",
  397. })
  398. );
  399. // Sets "X-Permitted-Cross-Domain-Policies: by-content-type"
  400. app.use(
  401. helmet.permittedCrossDomainPolicies({
  402. permittedPolicies: "by-content-type",
  403. })
  404. );
  405. ```
  406. You can install this module separately as `helmet-crossdomain`.
  407. </details>
  408. <details>
  409. <summary><code>helmet.hidePoweredBy()</code></summary>
  410. `helmet.hidePoweredBy` removes the `X-Powered-By` header, which is set by default in some frameworks (like Express). Removing the header offers very limited security benefits (see [this discussion](https://github.com/expressjs/express/pull/2813#issuecomment-159270428)) and is mostly removed to save bandwidth.
  411. This middleware takes no options.
  412. If you're using Express, this middleware will work, but you should use `app.disable("x-powered-by")` instead.
  413. Examples:
  414. ```js
  415. // Removes the X-Powered-By header if it was set.
  416. app.use(helmet.hidePoweredBy());
  417. ```
  418. You can install this module separately as `hide-powered-by`.
  419. </details>
  420. <details>
  421. <summary><code>helmet.xssFilter()</code></summary>
  422. `helmet.xssFilter` disables browsers' buggy cross-site scripting filter by setting the `X-XSS-Protection` header to `0`. See [discussion about disabling the header here](https://github.com/helmetjs/helmet/issues/230) and [documentation on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection).
  423. This middleware takes no options.
  424. Examples:
  425. ```js
  426. // Sets "X-XSS-Protection: 0"
  427. app.use(helmet.xssFilter());
  428. ```
  429. You can install this module separately as `x-xss-protection`.
  430. </details>