API request from react form to camunda being blocked by CORS

Have created a simple process and deployed it using tomcat:

I am able to make the POST request using postman and start the process without any problem

I have also created a simple react application which makes the same post request using axios
the javascript code is correct because am able to access other backend API using same code.When I try this with camunda, always get hit with this error :

Have tried posting request with
‘Access-Control-Allow-Credentials’ : ‘true’
as header

I have already tried adding a Configuration bean using this posts as reference:

I tried adding the CORS filter in engine-rest/web.xml file using this filter

If anyone knows how to resolve this issue please help me out.

@Teejay what’s your deployment model? Deploying process applications into containers or spring boot deployment(embedded container)?

I have simply used start.camunda.com to create a spring application including REST and web app dependencies. Then deployed a process on it using camunda modeler.