From 5d43086f5aff61d4af10635a19e8a4a3c9b273b7 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Thu, 12 Jul 2018 13:10:08 -0700 Subject: [PATCH] Fixed protocol on http api so HTTPS works --- app/state/HttpApi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/state/HttpApi.ts b/app/state/HttpApi.ts index e80229a..7118ee1 100644 --- a/app/state/HttpApi.ts +++ b/app/state/HttpApi.ts @@ -16,7 +16,7 @@ export default class HttpApi { return { Authorization: `Bearer ${this.tokenStore.accessToken.token}` }; } - constructor(baseUrl: string = `http://${location.hostname}:${location.port}/api`) { + constructor(baseUrl: string = `${location.protocol}://${location.hostname}:${location.port}/api`) { while (baseUrl.charAt(baseUrl.length - 1) === "/") { baseUrl = baseUrl.substring(0, baseUrl.length - 1); }