From 9ecde3c7fab3ad13642d1f3aaaa4622432905554 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Thu, 16 Jan 2025 13:51:42 -0700 Subject: [PATCH] normalize urls --- .../ui/src/app/pages/server-routes/acme/acme.page.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/projects/ui/src/app/pages/server-routes/acme/acme.page.ts b/web/projects/ui/src/app/pages/server-routes/acme/acme.page.ts index b17af017a..224fdfba5 100644 --- a/web/projects/ui/src/app/pages/server-routes/acme/acme.page.ts +++ b/web/projects/ui/src/app/pages/server-routes/acme/acme.page.ts @@ -59,12 +59,14 @@ export class ACMEPage { private async saveAcme(val: typeof acmeSpec._TYPE) { const loader = this.loader.open('Saving').subscribe() + const rawUrl = + val.provider.selection === 'other' + ? val.provider.value.url + : val.provider.selection + try { await this.api.initAcme({ - provider: - val.provider.selection === 'other' - ? val.provider.value.url - : val.provider.selection, + provider: new URL(rawUrl).href, contact: [`mailto:${val.contact}`], }) return true