mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-05 16:24:31 +02:00
url: always strip username, password, port, fragment
This commit is contained in:
parent
e1fa32beb3
commit
18a3c06a9e
@ -60,9 +60,11 @@ export function cleanURL(url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (stripQuery) {
|
if (stripQuery) {
|
||||||
url.search = url.hash = ''
|
url.search = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
url.username = url.password = url.port = url.hash = ''
|
||||||
|
|
||||||
if (url.pathname.endsWith('/'))
|
if (url.pathname.endsWith('/'))
|
||||||
url.pathname = url.pathname.slice(0, -1);
|
url.pathname = url.pathname.slice(0, -1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user