mirror of
https://github.com/bitwarden/web
synced 2025-12-06 00:03:28 +00:00
Add proxies for notifications and portal. Simplify environment service (#919)
This commit is contained in:
@@ -160,41 +160,47 @@ const devServer = {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:4000',
|
||||
pathRewrite: {'^/api' : ''}
|
||||
},
|
||||
'/identity': {
|
||||
target: 'http://localhost:33656',
|
||||
pathRewrite: {'^/identity' : ''}
|
||||
},
|
||||
'/events': {
|
||||
target: 'http://localhost:46273',
|
||||
pathRewrite: {'^/events' : ''}
|
||||
}
|
||||
},
|
||||
hot: false,
|
||||
};
|
||||
|
||||
if (ENV === "production") {
|
||||
devServer.proxy = {
|
||||
'/api': {
|
||||
target: 'https://api.bitwarden.com',
|
||||
pathRewrite: {'^/api' : ''},
|
||||
secure: false,
|
||||
changeOrigin: true
|
||||
},
|
||||
'/identity': {
|
||||
target: 'https://identity.bitwarden.com',
|
||||
target: 'http://localhost:33656',
|
||||
pathRewrite: {'^/identity' : ''},
|
||||
secure: false,
|
||||
changeOrigin: true
|
||||
},
|
||||
'/events': {
|
||||
target: 'https://events.bitwarden.com',
|
||||
target: 'http://localhost:46273',
|
||||
pathRewrite: {'^/events' : ''},
|
||||
secure: false,
|
||||
changeOrigin: true
|
||||
},
|
||||
'/notifications': {
|
||||
target: 'http://localhost:61840',
|
||||
pathRewrite: {'^/notifications' : ''},
|
||||
secure: false,
|
||||
changeOrigin: true
|
||||
},
|
||||
'/portal': {
|
||||
target: 'http://localhost:52313',
|
||||
pathRewrite: {'^/portal' : ''},
|
||||
secure: false,
|
||||
changeOrigin: true
|
||||
}
|
||||
};
|
||||
},
|
||||
hot: false,
|
||||
allowedHosts: [
|
||||
'bitwarden.test',
|
||||
],
|
||||
};
|
||||
|
||||
if (ENV === "production") {
|
||||
devServer.proxy['/api'].target = 'https://api.bitwarden.com';
|
||||
devServer.proxy['/identity'].target = 'https://identity.bitwarden.com';
|
||||
devServer.proxy['/events'].target = 'https://events.bitwarden.com';
|
||||
devServer.proxy['/notifications'].target = 'https://notifications.bitwarden.com';
|
||||
devServer.proxy['/portal'].target = 'https://portal.bitwarden.com';
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
||||
Reference in New Issue
Block a user