mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-09 14:03:11 +08:00
Fixed bug with overwriting opened tabs. Added proxy for websocket
This commit is contained in:
15
client/src/setupProxy.js
Normal file
15
client/src/setupProxy.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
|
||||
module.exports = function (app) {
|
||||
const apiProxy = createProxyMiddleware('/api', {
|
||||
target: 'http://localhost:5005'
|
||||
})
|
||||
|
||||
const wsProxy = createProxyMiddleware('/socket', {
|
||||
target: 'http://localhost:5005',
|
||||
ws: true
|
||||
})
|
||||
|
||||
app.use(apiProxy);
|
||||
app.use(wsProxy);
|
||||
};
|
||||
Reference in New Issue
Block a user