-
-
Save bjornlll/0e3b397808acb659b2b5588d9bd629cc to your computer and use it in GitHub Desktop.
Attach Meteor HTTP "Referrer-Policy" Headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Meteor.startup(() => { | |
WebApp.connectHandlers.use((req, res, next) => { | |
// See https://blog.appcanary.com/2017/http-security-headers.html#referrer-policy for details, | |
// and information around the other possible values for the Referrer-Policy header: | |
// - "no-referrer" | |
// - "no-referrer-when-downgrade" | |
// - "origin" | |
// - "origin-when-cross-origi" | |
// - "same-origin" | |
// - "strict-origin" | |
// - "strict-origin-when-cross-origin" | |
// - "unsafe-url" | |
res.setHeader("Referrer-Policy", "no-referrer"); | |
return next(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment