How to use the referrerPolicy function from helmet

Find comprehensive JavaScript helmet.referrerPolicy code examples handpicked from public code repositorys.

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',
        })
    );
};
fork icon257
star icon771
watch icon52

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' })
fork icon1
star icon2
watch icon3

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.
fork icon0
star icon0
watch icon0