url: re-parse hostname after validating

This commit is contained in:
dumbmoron 2023-12-14 23:14:22 +00:00
parent 34d8333d72
commit ba35ec923e
No known key found for this signature in database
GPG key ID: C59997C76C6A8E5F

View file

@ -48,11 +48,12 @@ export function aliasURL(url) {
break;
}
return { url, host: host.sld }
return url
}
export function cleanURL({ url, host }) {
export function cleanURL(url) {
assert(url instanceof URL);
const host = psl.parse(url.hostname).sld;
let stripQuery = true;
if (host === 'pinterest') {