Fix websockets in dev server proxy

This commit is contained in:
Tulir Asokan 2018-11-11 20:10:48 +02:00
parent 303a9827a1
commit 91cdfc9378
2 changed files with 6 additions and 1 deletions

View file

@ -25,7 +25,6 @@
"last 2 safari versions",
"last 2 ios_saf versions"
],
"proxy": "http://localhost:29316",
"homepage": ".",
"devDependencies": {
"sass-lint": "^1.12.1",

View file

@ -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 }))
}