fix: return bare Google URL in referer instead of search query
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 #172
This commit is contained in:
@@ -209,8 +209,7 @@ class TestFingerprintFunctions:
|
||||
url = "https://sub.example.com/page.html"
|
||||
result = generate_convincing_referer(url)
|
||||
|
||||
assert result.startswith("https://www.google.com/search?q=")
|
||||
assert "example" in result
|
||||
assert result == "https://www.google.com/"
|
||||
|
||||
def test_generate_convincing_referer_caching(self):
|
||||
"""Test referer generation caching"""
|
||||
|
||||
Reference in New Issue
Block a user