I am trying to consume an POST API in my web application and getting error: Access to XMLHttpRequest at 'https://XXXXX' from origin 'http://localhost:3030' 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.
Below is the CORS setting in APIM at API level:
<policies>
<inbound>
<base />
<cors allow-credentials="true">
<allowed-origins>
<origin>http://localhost:3030/</origin>
</allowed-origins>
<allowed-methods preflight-result-max-age="300">
<method>GET</method>
<method>POST</method>
<method>OPTIONS</method>
</allowed-methods>
<allowed-headers>
<header>*</header>
</allowed-headers>
</cors>
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
I am not sure what setting is wrong here. Quick help will be appreciated!!
Thanks in advance.