diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/helpers.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/helpers.ts b/src/helpers.ts index a063db169..cfebf394f 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -44,10 +44,10 @@ export function amountToPretty(amount: AmountJson): string { * See http://api.taler.net/wallet.html#general */ export function canonicalizeBaseUrl(url: string) { - const x = new URI(url); - if (!x.protocol()) { - x.protocol("https"); + if (!url.startsWith("http") && !url.startsWith("https")) { + url = "https://" + url; } + const x = new URI(url); x.path(x.path() + "/").normalizePath(); x.fragment(""); x.query(); |