Forest Admin UI can access local node server backend.
Actual behavior
CORS in the browser (Google Chrome) fails because the express server returns a 404 Not Found for the OPTIONS /forest/sessions-google request made by the Forest Admin UI. All my own routes work fine. It may be worth noting that I am using node clustering but that it is set up in such a way that each client will connect to the same process in order to get socket-io auth to work properly.
Thank you for your feedback, it is very detailed and it helps a lot!
I have a few questions. I’ll try to reproduce your issue, but as you seem to use a previous version of forest-express-mongoose, I suppose that your project is not new.
Can you confirm that all other forest routes are working, and that you only noticed the issue on this route /forest/sessions-google? Or was it working before and stopped working recently?
I could not reproduce your issue. Can you also share more info about how you use the variable named app in your example? Is it an express sub-application?
Hi. Sorry for the delay in getting back to you on this.
I’ve tested the other routes and they all work fine. It just seems to be the forest one that gives the 404.
It has been working previously, but then I made some changes in that I started using node cluster for load balancing. However I can’t imagine this is related because it works fine in the clustered for all the other routes.
I will have a look at it again tomorrow to see if I can find out anything else about it.
Is there anything I can do with the node module to enable more verbose debugging?
No. Let me see if I can create a simplified version to see if I can work out what’s happening… The issue is I kind of inherited this part of the code so I’m trying to learn forest admin from back to front really. Thanks for your patience. I’ll get back to you hopefully with some more insights.