-
Notifications
You must be signed in to change notification settings - Fork 77
/
proxy.conf.js
30 lines (24 loc) · 925 Bytes
/
proxy.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const vantageLoginProxyConfig = require('@td-vantage/ui-platform/auth/config/vantageLoginProxyConfig');
/* * * * * * * * * * * */
/* Edit these variables to point to your */
/* Vantage and local development environments */
/* * * * * * * * * * * */
const serverUrl = undefined; // Replace with Vantage base url. Ex: https://vantage.url.io
const localUrl = 'localhost:4200';
const localProto = 'http'; // http or https
if (!serverUrl) {
throw Error('Update the serverUrl variable in the proxy.conf.js to point to your vantage env.');
}
/* * * * * * * * * * * */
/* This section contains the routes proxied through */
/* your local development environment and the Vantage deployment */
/* * * * * * * * * * * */
const PROXY_CONFIG = {
...vantageLoginProxyConfig({ serverUrl, localUrl, localProto }),
'/api': {
target: serverUrl,
secure: false,
changeOrigin: true,
},
};
module.exports = PROXY_CONFIG;