Fixed location.protocol usage
This commit is contained in:
parent
5d43086f5a
commit
2413be7dd4
@ -16,7 +16,7 @@ export default class HttpApi {
|
|||||||
return { Authorization: `Bearer ${this.tokenStore.accessToken.token}` };
|
return { Authorization: `Bearer ${this.tokenStore.accessToken.token}` };
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(baseUrl: string = `${location.protocol}://${location.hostname}:${location.port}/api`) {
|
constructor(baseUrl: string = `${location.protocol}//${location.hostname}:${location.port}/api`) {
|
||||||
while (baseUrl.charAt(baseUrl.length - 1) === "/") {
|
while (baseUrl.charAt(baseUrl.length - 1) === "/") {
|
||||||
baseUrl = baseUrl.substring(0, baseUrl.length - 1);
|
baseUrl = baseUrl.substring(0, baseUrl.length - 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user