Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Privacy 2024 - CNAMEs and cleanup #117

Merged
merged 12 commits into from
Jun 10, 2024
23 changes: 22 additions & 1 deletion dist/privacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,5 +346,26 @@ return JSON.stringify({
navigator_geolocation_watchPosition: testPropertyStringInResponseBodies(
'navigator.+geolocation.+watchPosition'
),
}
},

/**
* List of hostnames with CNAME record
*/
request_hostnames_with_cname: (() => {
let results = {};

for (const request of $WPT_REQUESTS) {
request_hostname = (new URL(request.url)).hostname;

for (const [origin, dns_info] of Object.entries($WPT_DNS)) {
dns_hostname = (new URL(origin)).hostname;
max-ostapenko marked this conversation as resolved.
Show resolved Hide resolved

if (dns_hostname === request_hostname) {
max-ostapenko marked this conversation as resolved.
Show resolved Hide resolved
results[dns_hostname] = dns_info.results.canonical_names[0];
max-ostapenko marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

return results;
})()
});