i have a ReactJS Client that tries to send a POST Request to my Camunda Engine. Whenever i submit my form i get following error:
Failed to load http://localhost:8080/rest/process-definition/key/TestBuildPipeline/submit-form: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:3000’ is therefore not allowed access. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
I tried with this solution, adding this Method to my Application Class
Then i got GET Requests to my Spring Boot Application to work. Still Camunda REST Engine is not working. After lot of research i didnt found any solution. Btw Postman does work.
I tried with the web.xml (like here) but i dont know where to put it… Right now i created the folder “src/main/webapp/WEB-INF” and put it there, but it doesnt seem to get processed. The other solution with the nginx proxy is way too much for my needs.
My Camunda Engine is running as a Spring Boot Application, i start it using Maven and i think Tomcat is deploying the server.