From c256daf8c814e84da0e8075598f7c7024727bec6 Mon Sep 17 00:00:00 2001 From: Miguel Medeiros Date: Fri, 3 Sep 2021 16:22:39 -0300 Subject: [PATCH] Fix document location protocol for curl url. --- .../src/app/components/api-docs/api-docs.component.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/components/api-docs/api-docs.component.ts b/frontend/src/app/components/api-docs/api-docs.component.ts index 851ae8519..40af1d8e0 100644 --- a/frontend/src/app/components/api-docs/api-docs.component.ts +++ b/frontend/src/app/components/api-docs/api-docs.component.ts @@ -37,14 +37,10 @@ export class ApiDocsComponent implements OnInit { ); if (document.location.port !== '') { - this.hostname = this.hostname + ':' + document.location.port; + this.hostname = `${this.hostname}:${document.location.port}`; } - if (document.location.protocol === 'https') { - this.hostname = `https://${this.hostname}`; - } else { - this.hostname = `http://${this.hostname}`; - } + this.hostname = `${document.location.protocol}//${this.hostname}`; if (document.location.hostname === 'localhost') { if (this.env.BASE_MODULE === 'bisq') {