referrer-policy
    Overview
    Documentation
    Insights
    Code
    Contributors
    Dependencies
    Alternatives

referrer-policy

Middleware to set the Referrer-Policy HTTP header

1.2.0  •  Published 7 months ago  •  by helmetjs  •  MIT License

Referrer Policy

Build Status

The Referer HTTP header is typically set by web browsers to tell the server where it’s coming from. For example, if you click a link on example.com/index.html that takes you to wikipedia.org, Wikipedia’s servers will see Referer: example.com. This can have privacy implications—websites can see where you are coming from. The new Referrer-Policy HTTP header lets authors control how browsers set the Referer header.

Read the spec to see the options you can provide.

Usage:

const referrerPolicy = require('referrer-policy')

app.use(referrerPolicy({ policy: 'same-origin' }))
// Referrer-Policy: same-origin

app.use(referrerPolicy({ policy: 'unsafe-url' }))
// Referrer-Policy: unsafe-url

app.use(referrerPolicy())
// Referrer-Policy: no-referrer
How do you feel about the name Devstore for this site?

Popularity

Weekly Downloads
638.9K
Stars
10

Maintenance

Development

Last ver 7 months ago
Created 3 years ago
Last commit 3 months ago
1 month between commits

Technology

Node version: 11.14.0
6.2K unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

3 contributors
Evan Hahn
Maintainer, 40 commits, 2 merges
Works at Airtable
Partha Ramanujam
1 commits, 1 PRs
dependabot[bot]
1 commits
Adam Baldwin
Maintainer
Works at npm
dependabot
2 PRs

Tags

helmet
security
express
connect
referer
referrer
privacy
Ready for the next level?
Join Devstore's founding team to help us build the ultimate open-source app store, work with the latest technologies, and enjoy great culture, impact and autonomy
© 2019 Devstore, Inc.
Devstore helps developers find and use open-source packages, so they can focus on building amazing things