{"library":"referrer-policy","title":"referrer-policy","description":"Express/Connect middleware to set the Referrer-Policy HTTP header, part of the Helmet.js security suite. Version 1.2.0 is stable and works with Node >=4. Ships TypeScript definitions. Allows specifying one of the standard policy values (e.g., no-referrer, same-origin, strict-origin-when-cross-origin) or an array of policies for fallback. Lightweight and focused, with no external dependencies.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install referrer-policy"],"cli":null},"imports":["import referrerPolicy from 'referrer-policy'","const referrerPolicy = require('referrer-policy')","import referrerPolicy from 'referrer-policy'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import express from 'express';\nimport referrerPolicy from 'referrer-policy';\n\nconst app = express();\napp.use(referrerPolicy({ policy: 'same-origin' }));\n// Sets Referrer-Policy: same-origin\n\napp.listen(3000);","lang":"typescript","description":"Shows how to import and use the middleware with Express, setting the policy to 'same-origin'.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}