Fetch requests to my rabbitmq instance are failing in a nodejs server, but they work in the browser, with curl, and with postman. Initially they were only working if I sent the request from the rabbitmq dashboard itself. I saw in the docs of the management plugin that I have to configure cors headers using the
management.cors.allow_origins option. I used the least restricted setting (
management.cors.allow_origins.1 = *) and this allowed the requests to work in any browser tab provided the csp would allow it. But from my nodejs server it still doesn't work. Worth mentioning that the rabbitmq instance is currently not associated with a domain name, it's just the IP address i.e. something like
http://12.34.56.78:15672. I don't know if the lack of ssl makes a difference. I've tried nodejs'
http package, the equivalent
https package, as well as a separate javascript request library, but it's the same outcome i.e. 404 not found. Again, using
fetch in the browser has been working since I added the cors setting described above. The nodejs server is using express, for what it's worth. Any ideas as to what could be causing this? Thanks!