Browse Source

fix(webpack.config.js): specify Host header in the webpack proxy pass

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'
efficient_tiling
paweldomas 5 years ago
parent
commit
6c3a5793b4
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      webpack.config.js

+ 4
- 1
webpack.config.js View File

38
             '/': {
38
             '/': {
39
                 bypass: devServerProxyBypass,
39
                 bypass: devServerProxyBypass,
40
                 secure: false,
40
                 secure: false,
41
-                target: devServerProxyTarget
41
+                target: devServerProxyTarget,
42
+                headers: {
43
+                    'Host': new URL(devServerProxyTarget).host
44
+                }
42
             }
45
             }
43
         }
46
         }
44
     },
47
     },

Loading…
Cancel
Save