I am getting the following errors in the browser when trying to call a DELETE REST API hosted in Azure API Gateway and Azure function. All other API requests (GET, POST) are working fine.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxxx.azure-api.net/Lookup/a03aebd1c. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxxxx.azure-api.net/Lookup/a03aebd1c. (Reason: CORS request did not succeed).
The Azure API gateway CORS configuration is
<policies>
<inbound>
<base />
<cors>
<allowed-origins>
<origin>https://xxxx.z13.web.core.windows.net</origin>
</allowed-origins>
<allowed-methods>
<method>GET</method>
<method>POST</method>
<method>DELETE</method>
<method>OPTIONS</method>
</allowed-methods>
</cors>
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
Any Advice on how to fix this issue?