The scenario is, I want to use the rasa nlu server with my react application. My react application runs on port 3000 and I am running rasa nlu server on port 5002.
I am following this guide to run the server: Server Configuration
While testing with postman application, nlu apis are working fine. But while doing the same api requests from the react application, it is failing.
The error I am facing while sending request: xhr.js?14ed:178 OPTIONS http://localhost:5002/parse 403 (Forbidden) Access to XMLHttpRequest at ‘http://localhost:5002/parse’ from origin ‘http://localhost:3000’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
I tried a lot to fix this issue with --cors argument, but still, it is not working and still showing the same errors again and again. Probably I am not understanding how to use the cors argument properly.
Can anyone tell me how to fix it? It will be a great help since there are no proper answers out there on how to use cors arguments on any website. Let me know if anyone needs more information on this.
Best Regards, Abhishek C