Websockets reverse proxy in IIS 8

后端 未结 3 936
醉梦人生
醉梦人生 2020-12-03 01:59

I\'m attempting to connect to a websockets server (websockify) through a reverse proxy on IIS. The IIS and websockets server reside on the same physical server (Windows Serv

3条回答
  •  难免孤独
    2020-12-03 02:20

    The TLDR is to:

    1. url redirect the ws and wss protocols correctly
    2. disable the compression in the node server socket io, passing the option perMessageDeflate. disable compression as APR 3 In IIS Proxy does not support it
    const io = require("socket.io")(server, {
      transports: ["websocket", "polling"],
      perMessageDeflate: false 
    });
    

提交回复
热议问题