mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-17 22:00:00 +00:00
url: always strip username, password, port, fragment
This commit is contained in:
parent
e1fa32beb3
commit
18a3c06a9e
1 changed files with 3 additions and 1 deletions
|
@ -60,9 +60,11 @@ export function cleanURL(url) {
|
|||
}
|
||||
|
||||
if (stripQuery) {
|
||||
url.search = url.hash = ''
|
||||
url.search = ''
|
||||
}
|
||||
|
||||
url.username = url.password = url.port = url.hash = ''
|
||||
|
||||
if (url.pathname.endsWith('/'))
|
||||
url.pathname = url.pathname.slice(0, -1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue