Fix document location protocol for curl url.

This commit is contained in:
Miguel Medeiros 2021-09-03 16:22:39 -03:00
parent ba0fb996d2
commit c256daf8c8
No known key found for this signature in database
GPG Key ID: 819EDEE4673F3EBB

View File

@ -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') {