Are you able to make the appropriate changes in our docs?
Yes, can do, I should have something ready to go soon-ish.
[edit]
https://github.com/NodeBB/docs/pull/89
[/edit]
Are you able to make the appropriate changes in our docs?
Yes, can do, I should have something ready to go soon-ish.
[edit]
https://github.com/NodeBB/docs/pull/89
[/edit]
Hi,
I am fairly new to node.js and am writing a games oriented server that uses the 'express' node.js module to serve static content, and websockets for game management. I am also using MongoDB for DB support.
Is it possible to add a nodebb forum to such a setup, eg: under the https://mywebsite/forums URL? I don't need to share the login/user system or anything too clever, I'm quite happy with the forum behaving as if it was a completely different site for now.
I already have various 'services' that attach themselves to the express app using, for example...
app.get("/.well-known/webfinger", (req, res)=>{
});
...for handling webfinger requests, and was hoping I could do something similar for nodebb requests, eg:
app.get("/forums", (req, res)={
// awesomely simple code here, eg:
nodebb.processRequest(req, res);
});
I doubt it's that simple, but that hopefully describes what I want to achieve fairly well. I have no idea what the 'industry standard' way to do this sort of thing is...
Bye!
Mark
I think I've found the silver bullet here: you need to set the 'xfwd' option when creating the proxy. With this option enabled, I no longer have to hack the cookie secure flag as above and everything (v.3.6.5) appears to be working perfectly. I'm using http-proxy-middleware, but it should work with any http proxy AFAICT as 'xfwd' is actually part of the base http-proxy module which everything else seems to be built upon.
So to proxy using the http-proxy module:
const proxy = httpProxy.createProxyServer();
app.use("/forum", (req, res) => {
proxy.web(req, res, {target:"http://localhost:4567/forum", xfwd: true});
});
...and to proxy using the http-proxy-middleware module:
app.use("/forum", createProxyMiddleware({target: "http://localhost:4567", xfwd: true}));
Bye!
Mark
Sorted it by adding proxy_set_header X-Forwarded-Proto $scheme; in the nginx conf file
Problem is, I'm just using 'raw' node.js, so there is no nginx (or apache etc) conf file.
But your above post did inspire me to find out what the equivalent was for node proxys so thanks!
Bye,
Mark
With the current codebase, making a group hidden also removes it from the badge selection.
Yes, it's working now, not sure why it wasn't earlier but thanks everyone!