diff --git a/maubot/management/frontend/package.json b/maubot/management/frontend/package.json index 320679b..29e19e0 100644 --- a/maubot/management/frontend/package.json +++ b/maubot/management/frontend/package.json @@ -25,7 +25,6 @@ "last 2 safari versions", "last 2 ios_saf versions" ], - "proxy": "http://localhost:29316", "homepage": ".", "devDependencies": { "sass-lint": "^1.12.1", diff --git a/maubot/management/frontend/src/setupProxy.js b/maubot/management/frontend/src/setupProxy.js new file mode 100644 index 0000000..666772d --- /dev/null +++ b/maubot/management/frontend/src/setupProxy.js @@ -0,0 +1,6 @@ +const proxy = require("http-proxy-middleware") + +module.exports = function(app) { + app.use(proxy("/_matrix/maubot/v1", { target: "http://localhost:29316" })) + app.use(proxy("/_matrix/maubot/v1/logs", { target: "http://localhost:29316", ws: true })) +}