Procházet zdrojové kódy

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'
j8
paweldomas před 5 roky
rodič
revize
6c3a5793b4
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4
    1
      webpack.config.js

+ 4
- 1
webpack.config.js Zobrazit soubor

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

Načítá se…
Zrušit
Uložit