ソースを参照

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'
master
paweldomas 5年前
コミット
6c3a5793b4
1個のファイルの変更4行の追加1行の削除
  1. 4
    1
      webpack.config.js

+ 4
- 1
webpack.config.js ファイルの表示

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

読み込み中…
キャンセル
保存