Can you use cloudflare or any other free CDN with nodebb?


  • Im using cloudflare with my install and its working fine ๐Ÿ˜„

    https://forums.gamerlabs.net


  • @xCausxn Nope, its not ๐Ÿ˜„ :

    "WebSocket connection to 'wss://forums.gamerlabs.net/socket.io/1/websocket/hYGYH3JWv9X76FZYhx7Q' failed: Error during WebSocket handshake: Unexpected response code: 502"


  • Well the forum works fine without it ๐Ÿ˜›

    i know thats not the point but hehe


  • hey folks, I wasยดnt aware the CF does not support Websockets , thanks to this thread, what i like about CF is that you can entirely hide your real IP, the DNS just points to an anycast IP address and your not exposed to hackers or DDos, so far so good, changed the settings , but now my nodebb forum seems kinda frozen, i am logged in as admin, but can't change anything, not even log-out, what needs to be done to bring it back to life ? ๐Ÿ˜Š

    Thanks

  • GNU/Linux Admin

    @macbroadcast Most likely disable any sort of "speedup" caching, and disable CF acceleration as well.

    "Grey clouds" ๐Ÿ‘


  • How can this be optimized?

    There are page rules and URL patterns for detailed settings. Would like to switch on SSL but disable cache for the nodebb. Which paths could be cached? Which not?

  • GNU/Linux Admin

    @v4 I am unaware of the current state of CF's caching mechanism. It may very well work fine with NodeBB, but when I tested (1.5 years ago!!) it did not work well.

    Namely, CF's new Rocket Loader was minifying our already minified files, and possibly serving them out of order. If you investigate the source of a NodeBB page, you'll see certain scripts that are not bundled into the minified js file. CF modified the page html to load their own cached js, possibly loaded scripts out of order, and things just didn't load properly.

    CF also doesn't proxy websockets correctly (except for the most ๐Ÿ’ฐ plan, but this may change in the future, hopefully).


  • As a follow up, is there some way to specify a subdomain for sockets.io? I have seen mention of adding something to config.json, but my attempts to add that failed.

  • GNU/Linux Admin

    There should be, but not without modifying the code somewhat. I don't think you can do it out-of-the-box.


  • Ahh thanks for the clarification, I'll look at what needs to be changed, but I probally leave it alone for compatibility reasons.

Suggested Topics

| |