set proper api url

This commit is contained in:
Kyle Spearrin 2018-06-21 22:10:20 -04:00
parent 51efa59728
commit cb1a62ee27
1 changed files with 6 additions and 7 deletions

View File

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