@@ -54,7 +54,7 @@ app.use(
5454 " script-src" : [" 'self'" , " example.com" ],
5555 },
5656 },
57- })
57+ }),
5858);
5959```
6060
@@ -67,7 +67,7 @@ app.use(
6767 helmet ({
6868 contentSecurityPolicy: false ,
6969 xDownloadOptions: false ,
70- })
70+ }),
7171);
7272```
7373
@@ -99,7 +99,7 @@ app.use(
9999 " style-src" : null ,
100100 },
101101 },
102- })
102+ }),
103103);
104104```
105105
@@ -117,7 +117,7 @@ app.use(
117117 scriptSrc: [" 'self'" , (req , res ) => ` 'nonce-${ res .locals .cspNonce } '` ],
118118 },
119119 },
120- })
120+ }),
121121);
122122```
123123
@@ -138,7 +138,7 @@ app.use(
138138 upgradeInsecureRequests: [],
139139 },
140140 },
141- })
141+ }),
142142);
143143```
144144
@@ -172,7 +172,7 @@ app.use(
172172 },
173173 reportOnly: true ,
174174 },
175- })
175+ }),
176176);
177177```
178178
@@ -184,7 +184,7 @@ To disable the `Content-Security-Policy` header:
184184app .use (
185185 helmet ({
186186 contentSecurityPolicy: false ,
187- })
187+ }),
188188);
189189```
190190
@@ -234,7 +234,7 @@ app.use(helmet());
234234app .use (
235235 helmet ({
236236 crossOriginOpenerPolicy: { policy: " same-origin-allow-popups" },
237- })
237+ }),
238238);
239239```
240240
@@ -244,7 +244,7 @@ To disable the `Cross-Origin-Opener-Policy` header:
244244app .use (
245245 helmet ({
246246 crossOriginOpenerPolicy: false ,
247- })
247+ }),
248248);
249249```
250250
@@ -277,7 +277,7 @@ To disable the `Cross-Origin-Resource-Policy` header:
277277app .use (
278278 helmet ({
279279 crossOriginResourcePolicy: false ,
280- })
280+ }),
281281);
282282```
283283
@@ -309,7 +309,7 @@ To disable the `Origin-Agent-Cluster` header:
309309app .use (
310310 helmet ({
311311 originAgentCluster: false ,
312- })
312+ }),
313313);
314314```
315315
@@ -342,7 +342,7 @@ app.use(
342342 referrerPolicy: {
343343 policy: " no-referrer" ,
344344 },
345- })
345+ }),
346346);
347347
348348// Sets "Referrer-Policy: origin,unsafe-url"
@@ -351,7 +351,7 @@ app.use(
351351 referrerPolicy: {
352352 policy: [" origin" , " unsafe-url" ],
353353 },
354- })
354+ }),
355355);
356356```
357357
@@ -361,7 +361,7 @@ To disable the `Referrer-Policy` header:
361361app .use (
362362 helmet ({
363363 referrerPolicy: false ,
364- })
364+ }),
365365);
366366```
367367
@@ -398,7 +398,7 @@ app.use(
398398 strictTransportSecurity: {
399399 maxAge: 123456 ,
400400 },
401- })
401+ }),
402402);
403403
404404// Sets "Strict-Transport-Security: max-age=123456"
@@ -408,7 +408,7 @@ app.use(
408408 maxAge: 123456 ,
409409 includeSubDomains: false ,
410410 },
411- })
411+ }),
412412);
413413
414414// Sets "Strict-Transport-Security: max-age=123456; includeSubDomains; preload"
@@ -418,7 +418,7 @@ app.use(
418418 maxAge: 63072000 ,
419419 preload: true ,
420420 },
421- })
421+ }),
422422);
423423```
424424
@@ -428,7 +428,7 @@ To disable the `Strict-Transport-Security` header:
428428app .use (
429429 helmet ({
430430 strictTransportSecurity: false ,
431- })
431+ }),
432432);
433433```
434434
@@ -460,7 +460,7 @@ To disable the `X-Content-Type-Options` header:
460460app .use (
461461 helmet ({
462462 xContentTypeOptions: false ,
463- })
463+ }),
464464);
465465```
466466
@@ -493,14 +493,14 @@ Examples:
493493app .use (
494494 helmet ({
495495 xDnsPrefetchControl: { allow: false },
496- })
496+ }),
497497);
498498
499499// Sets "X-DNS-Prefetch-Control: on"
500500app .use (
501501 helmet ({
502502 xDnsPrefetchControl: { allow: true },
503- })
503+ }),
504504);
505505```
506506
@@ -510,7 +510,7 @@ To disable the `X-DNS-Prefetch-Control` header and use the browser's default val
510510app .use (
511511 helmet ({
512512 xDnsPrefetchControl: false ,
513- })
513+ }),
514514);
515515```
516516
@@ -542,7 +542,7 @@ To disable the `X-Download-Options` header:
542542app .use (
543543 helmet ({
544544 xDownloadOptions: false ,
545- })
545+ }),
546546);
547547```
548548
@@ -575,14 +575,14 @@ Examples:
575575app .use (
576576 helmet ({
577577 xFrameOptions: { action: " deny" },
578- })
578+ }),
579579);
580580
581581// Sets "X-Frame-Options: SAMEORIGIN"
582582app .use (
583583 helmet ({
584584 xFrameOptions: { action: " sameorigin" },
585- })
585+ }),
586586);
587587```
588588
@@ -592,7 +592,7 @@ To disable the `X-Frame-Options` header:
592592app .use (
593593 helmet ({
594594 xFrameOptions: false ,
595- })
595+ }),
596596);
597597```
598598
@@ -627,7 +627,7 @@ app.use(
627627 xPermittedCrossDomainPolicies: {
628628 permittedPolicies: " none" ,
629629 },
630- })
630+ }),
631631);
632632
633633// Sets "X-Permitted-Cross-Domain-Policies: by-content-type"
@@ -636,7 +636,7 @@ app.use(
636636 xPermittedCrossDomainPolicies: {
637637 permittedPolicies: " by-content-type" ,
638638 },
639- })
639+ }),
640640);
641641```
642642
@@ -646,7 +646,7 @@ To disable the `X-Permitted-Cross-Domain-Policies` header:
646646app .use (
647647 helmet ({
648648 xPermittedCrossDomainPolicies: false ,
649- })
649+ }),
650650);
651651```
652652
@@ -675,7 +675,7 @@ app.disable("x-powered-by");
675675app .use (
676676 helmet ({
677677 xPoweredBy: false ,
678- })
678+ }),
679679);
680680```
681681
@@ -703,7 +703,7 @@ To disable the `X-XSS-Protection` header:
703703app .use (
704704 helmet ({
705705 xXssProtection: false ,
706- })
706+ }),
707707);
708708```
709709
0 commit comments