Published REST service resulting in error with multiple Access-Control-Allow-Origin values
I am working on an app that an external application calls into the Mendix app through a POST service. When I run this locally everything works fine, however in the TEST environment when I deploy it I am seeing the following error: “...has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values...” In our TEST environment settings we have added ‘Access-Control-Allow-Origin’: ‘*’ to our HTTP headers. In the actual service I have the toggle for “Enable CORS” checked. When I uncheck it we get a different error that the service “does not pass HTTP ok” on TEST environment, but locally we get an error of “no Access-Control-Allow-Origin header exists”. I suspect that the global TEST setting and the “Enable CORS” setting are conflicting and adding multiple Access-Control-Allow-Origin headers, but I can’t confirm or find a workaround. We are using Studio PRO 8.17. Any help is greatly appreciated. Thx.