fix(server): update server URL normalization to retain path (#6647)
This commit is contained in:
parent
5f93beed77
commit
308e8060dc
1 changed files with 1 additions and 2 deletions
|
|
@ -11,8 +11,7 @@ export function normalizeServerUrl(input: string) {
|
||||||
const trimmed = input.trim()
|
const trimmed = input.trim()
|
||||||
if (!trimmed) return
|
if (!trimmed) return
|
||||||
const withProtocol = /^https?:\/\//.test(trimmed) ? trimmed : `http://${trimmed}`
|
const withProtocol = /^https?:\/\//.test(trimmed) ? trimmed : `http://${trimmed}`
|
||||||
const cleaned = withProtocol.replace(/\/+$/, "")
|
return withProtocol.replace(/\/+$/, "")
|
||||||
return cleaned.replace(/^(https?:\/\/[^/]+).*/, "$1")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function serverDisplayName(url: string) {
|
export function serverDisplayName(url: string) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue