Pārlūkot izejas kodu

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 gadus atpakaļ
vecāks
revīzija
6c3a5793b4
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4
    1
      webpack.config.js

+ 4
- 1
webpack.config.js Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt