Skip to content

Commit

Permalink
normalize urls
Browse files Browse the repository at this point in the history
  • Loading branch information
MattDHill committed Jan 16, 2025
1 parent d5ee876 commit 9ecde3c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions web/projects/ui/src/app/pages/server-routes/acme/acme.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9ecde3c

Please sign in to comment.