1
0
mirror of https://github.com/bitwarden/web synced 2025-12-16 00:03:25 +00:00

Configure webpack to proxy requests which avoids CORS issues (#914)

This commit is contained in:
Oscar Hinton
2021-04-05 22:38:21 +02:00
committed by GitHub
parent 12e4b614f5
commit 769c247832
3 changed files with 59 additions and 46 deletions

View File

@@ -157,18 +157,10 @@ export function initFactory(): Function {
'https://portal.bitwarden.com'; // window.location.origin + '/portal';
}
apiService.setUrls({
base: isDev ? null : window.location.origin,
api: isDev ? 'http://localhost:4000' : null,
identity: isDev ? 'http://localhost:33656' : null,
events: isDev ? 'http://localhost:46273' : null,
// Uncomment these (and comment out the above) if you want to target production
// servers for local development.
// base: null,
// api: 'https://api.bitwarden.com',
// identity: 'https://identity.bitwarden.com',
// events: 'https://events.bitwarden.com',
base: window.location.origin,
api: null,
identity: null,
events: null,
});
setTimeout(() => notificationsService.init(environmentService), 3000);