How to use the xssFilter function from helmet
Find comprehensive JavaScript helmet.xssFilter code examples handpicked from public code repositorys.
145 146 147 148 149 150 151 152 153 154
`xssFilter` - устанавливает заголовок `X-XSS-Protection`, активируя тем самым фильтр межсайтового скриптинга. ```js app.use( helmet.xssFilter({ setOnOldIE: true, reportUri: 'http://example.com/report', }) );
14
101
3
+ 5 other calls in file
3 4 5 6 7 8 9
exports.dnsPreFetchControl = helmet.dnsPrefetchControl() exports.frameGuard = helmet.frameguard() exports.ieNoOpen = helmet.ieNoOpen() exports.noSniff = helmet.noSniff() exports.xssFilter = helmet.xssFilter() exports.referrerPolicy = helmet.referrerPolicy({ policy: 'same-origin' })
1
2
3
52 53 54 55 56 57 58 59 60 61
objectSrc: ["'self'"], frameSrc: ["'self'"], fontSrc: ["'self'"], }, }), helmet.xssFilter(true), helmet.referrerPolicy({ policy: "no-referrer", }) );
0
0
1
helmet.contentSecurityPolicy is the most popular function in helmet (195 examples)