1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

set proper api url

This commit is contained in:
Kyle Spearrin 2018-06-21 22:10:20 -04:00
parent 51efa59728
commit cb1a62ee27

View File

@ -111,13 +111,12 @@ containerService.attachToWindow(window);
export function initFactory(): Function {
return async () => {
if (platformUtilsService.isDev()) {
await apiService.setUrls({
base: null,
api: 'https://api.bitwarden.com',
identity: 'https://identity.bitwarden.com',
});
} // TODO: elseif self host
const isDev = platformUtilsService.isDev();
await apiService.setUrls({
base: isDev ? null : window.location.origin,
api: isDev ? 'https://api.bitwarden.com' : null,
identity: isDev ? 'https://identity.bitwarden.com' : null,
});
lockService.init(true);
const locale = await storageService.get<string>(ConstantsService.localeKey);