url: always strip username, password, port, fragment
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user