How to use nodebb websocket with cdn which doesn't support websocket?

  • Hello, I'm using nodeBB to host a forum on, I really like nodebb for its simplicity and extensibility.

    My site met a bug
    WebSocket connection to 'wss://' failed: Error during WebSocket handshake: Unexpected response code: 400
    Then I found that it was caused by my CDN service, they won't support websocket. The site worked perfectly before using cdn, so it's not a problem of my nginx configuration.

    The question is what should I do to make nodebb use another subdomain for websocket which I will disable websocket for?

    Thanks for your help!

  • Community Rep

    You could just turn websockets to polling mode only, in your config.json file.

    It should look something like this:

      "": {
        "transports": ["polling"]

    Performance for your users should remain mostly the same.

  • Thank you for this solution, it works like a charm.

Suggested Topics

| | | |