aboutsummaryrefslogtreecommitdiff
path: root/modern/src/setupProxy.js
blob: bc0daf06e0d19459fff62ff8e92a112e52bd42e9 (plain)
1
2
3
4
5
6
7
8
/* eslint-disable import/no-extraneous-dependencies */

const proxy = require('http-proxy-middleware');

module.exports = (app) => {
  app.use(proxy('/api/socket', { target: `wss://${process.env.REACT_APP_URL_NAME}`, changeOrigin: true, ws: true }));
  app.use(proxy('/api', { target: `https://${process.env.REACT_APP_URL_NAME}`, changeOrigin: true }));
};