forked from PlaceOS/user-interfaces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proxy.conf.js
32 lines (30 loc) · 836 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
31
32
/** FQDN to proxy requests. i.e. No protocol and path should be in the value */
const domain = 'placeos-dev.aca.im';
/** Whether the proxied endpoints use SSL */
const secure = true;
/** Whether the SSL certificate used is valid on the internet */
const valid_ssl = false;
const PROXY_CONFIG = [
{
context: [
'/control',
'/auth',
'/api',
'/styles',
'/scripts',
'/login',
'/backoffice',
],
target: `http${secure ? 's' : ''}://${domain}`,
secure: valid_ssl,
changeOrigin: true,
},
{
context: ['/control/websocket', '/api'],
target: `ws${secure ? 's' : ''}://${domain}`,
secure: valid_ssl,
changeOrigin: true,
ws: true,
},
];
module.exports = PROXY_CONFIG;