How to use the referrerPolicy function from helmet
Find comprehensive JavaScript helmet.referrerPolicy code examples handpicked from public code repositorys.
GitHub: AthenZ/athenz
101 102 103 104 105 106 107 108 109 110
let error = new Error(); error.message = 'Failed Input validation. Please refresh the page'; return res.status(403).send(error); }); expressApp.use( helmet.referrerPolicy({ policy: 'strict-origin-when-cross-origin', }) ); };
257
771
52
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
20 21 22 23 24 25 26 27 28 29
// app.use(helmet()); // // X-Powered-By preventing to tell what system it runs on. // app.use(helmet.hidePoweredBy({setTo: 'Django/1.2.2 SVN:65334'})); // //Referrer-Policy that refer to the http adress. // app.use( // helmet.referrerPolicy({ // policy: ["origin", "unsafe-url"], // }) // ); // // cross-site scripting extra prevention layer.
0
0
0
helmet.contentSecurityPolicy is the most popular function in helmet (195 examples)