Skip to content

[SOLVED] - Only domain recorded as referrer #3490

Answered by dgw
jeffshead asked this question in Q&A
Discussion options

You must be logged in to vote

Browsers are shifting/have shifted to a stricter default referrer policy. While the old default was no-referrer-when-downgrade, cross-origin requests will likely only get the origin (domain) by default from most browsers now as the strict-origin-when-cross-origin policy has been adopted as the new default by browsers including Firefox and Chrome/Chromium.

YOURLS only caps the length of the referrer, though a plugin could further modify it:

function yourls_get_referrer() {
$referrer = isset( $_SERVER['HTTP_REFERER'] ) ? yourls_sanitize_url_safe( $_SERVER['HTTP_REFERER'] ) : 'direct';
return yourls_apply_fi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jeffshead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants