-
-
Save jaydenlin/2d8f433ac7be2e7ad59a056955abc694 to your computer and use it in GitHub Desktop.
Set referrer header in JS.
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
// See https://stackoverflow.com/a/23434948 | |
function setReferrerHeader(referrerName) { | |
Object.defineProperty(document, "referrer", { | |
get: function () { return referrerName; }, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment