Solved by myself, this documentation could be a bit updated for easier implementation, for those who will the same problem, let me give necessary steps:
Install the plugin Rebuild then restart NodeBB Add some custom fields You can edit them by going to edit profile and "Change Extra" To display them in user profile, in case if you're using Person theme, go to nodebb-theme-person -> templates -> account -> profile.tpl Paste the code wherever you want it do be visible <!-- IF customFields.length --> <div class="custom-fields"> <!-- BEGIN customFields --> <div class="custom-field-item"> <span class="field-label">{customFields.name}</span> <span class="field-value">{customFields.value}</span> </div> <!-- END customFields --> </div> <!-- ENDIF customFields.length --> Rebuild then restart NodeBBHow to use nodebb websocket with cdn which doesn't support websocket?
-
Hello, I'm using nodeBB to host a forum on https://www.heigoule.com, I really like nodebb for its simplicity and extensibility.
My site met a bug
WebSocket connection to 'wss://www.heigoule.com/socket.io/?EIO=3&transport=websocket&sid=ziovHZJFdHWmdYmkAAAD' 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!
-
You could just turn websockets to polling mode only, in your
config.json
file.It should look something like this:
{ ... "socket.io": { "transports": ["polling"] }, ... }
Performance for your users should remain mostly the same.
-
Thank you for this solution, it works like a charm.