mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-17 22:00:00 +00:00
url: re-parse hostname after validating
This commit is contained in:
parent
34d8333d72
commit
ba35ec923e
1 changed files with 3 additions and 2 deletions
|
@ -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') {
|
||||
|
|
Loading…
Reference in a new issue