fix: return bare Google URL in referer instead of search query#179
Merged
D4Vinci merged 2 commits intoD4Vinci:devfrom Mar 8, 2026
Merged
fix: return bare Google URL in referer instead of search query#179D4Vinci merged 2 commits intoD4Vinci:devfrom
D4Vinci merged 2 commits intoD4Vinci:devfrom
Conversation
Real browsers send `https://www.google.com/` as the Referer header when clicking search results, not the full search URL with query parameters. The previous format was a fingerprinting signal that the referer was spoofed. Closes D4Vinci#172
D4Vinci
approved these changes
Mar 8, 2026
Owner
D4Vinci
left a comment
There was a problem hiding this comment.
Thanks for this fix. I have tried it manually in my browser, and the referer is as you said. I don't know when this was changed, but I will need to remove this function and update the rest of the docs pages as well.
Anyway, thanks again for raising this!
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Real browsers send
https://www.google.com/as theRefererheader when clicking Google search results — not the full search URL with query parameters. The previoushttps://www.google.com/search?q=<domain>format is a detectable fingerprinting signal that the referer is spoofed.generate_convincing_referer()to returnhttps://www.google.com/Fixes #172 (Issue 1 only —
Sec-Fetch-Siteis a Forbidden Request Header and cannot be spoofed from userland)