I checked out v1.16.2 of the forum and was running node version 15.12 when I encountered the same error.
I downgraded to node version 14.6.0 and now this error is not coming up.
I hope this info can help anyone.
I noticed in https://github.com/NodeBB/NodeBB/pull/3899 that the issue of CORS was discussed.
What was the outcome of this.
I am creating an extension to my nodebb forum, and I am creating a separate website to run alongside my forum.
When in production, the forum will reside along the same hostname, and same port, hidden behind an Nginx proxy.
For development however this isn't the case, and I am presented a CORS error.
I saw talks of creating a whitelist of CORS enabled servers.
How do I go about configuring my nodebb server to send the CORS header.
Thanks.
Calum
Access-Control-Allow-*
headers can be set in the ACP (likely under "Advanced"). You can also use nginx to send headers to NodeBB
@julian Sorry Juilian.
Yes that's spot on thanks.
I shall test that later on.
As said, during production it will "appear" from the same server. I just can't be bothered to replicate that system today.
Cheers!
@julian Boom, yeah that's working a charm now thanks.
Glad to hear it!