With a simple policy below:
<policies>
<inbound>
<cors>
<allowed-origins>
<origin>http://microfost.com/</origin>
</allowed-origins>
<allowed-methods preflight-result-max-age="300">
<method>GET</method>
<method>POST</method>
<method>PATCH</method>
<method>DELETE</method>
</allowed-methods>
<allowed-headers>
<header>content-type</header>
<header>accept</header>
<header>Authorization</header>
</allowed-headers>
</cors>
</inbound>
</policies>
HTTP request
OPTIONS https://XXXX.azure-api.net/demo/XXX/XXX/* HTTP/1.1
Host: XXXX.azure-api.net
Ocp-Apim-Trace: true
Ocp-Apim-Subscription-Key: <secret>
Origin: http://microfost.com
Access-Control-Request-Headers: Authorization
Access-Control-Request-Method: GET
Response content
Access-Control-Allow-Origin: http://microfost.com
Ocp-Apim-Trace-Location: <trace>
Date: Mon, 27 Feb 2017 20:09:14 GMT
Content-Length: 0
I get this message and expect Origin response header I do not receive anything for 2 out of 3 APIs (1 API is working with the same policy as expected).
**Inbound**
[...]
cors (0 ms)
"Cross domain request was well formed and was allowed to proceed. CORS related headers were added to the response."
**Backend**
No records.
Outbound
cors (0 ms)
{
"message": "Headers starting with 'Access-Control-' were removed from the response. ",
"headers": []
}
transfer-response (0 ms)
{
"message": "Response headers have been sent to the caller."
}
This seems to me a nonsense behavior and might be a bug. Before submitting it I would like to ask you if there is any explanation? Why do I get this?
Headers starting with 'Access-Control-' were removed from the response.