Skip to content

Commit

Permalink
fix(webpack.config.js): specify Host header in the webpack proxy pass
Browse files Browse the repository at this point in the history
Without changing the 'Host' header, a standalone instance we use for
jitsi dev work will generate:

config.websocket = 'wss://localhost:8080/xmpp-websocket'

This was fine with BOSH, but a Websocket will not connect.

With this change it will be(based on the default devServerProxyTarget):

config.websocket = 'wss://alpha.jitsi.net/xmpp-websocket'
  • Loading branch information
paweldomas committed Jan 28, 2020
1 parent c05b4a4 commit 6c3a579
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ const config = {
'/': {
bypass: devServerProxyBypass,
secure: false,
target: devServerProxyTarget
target: devServerProxyTarget,
headers: {
'Host': new URL(devServerProxyTarget).host
}
}
}
},
Expand Down

0 comments on commit 6c3a579

Please sign in to comment.