diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index 9c59f47189..3aeb9bbe49 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -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(ConstantsService.localeKey);