In my Azure API Management I have defined CORS policy for an entire API. Everything works great with the OPTIONS command and the allowed-origin is returned with every succesful request and also 500 responses.
For some strange reason, when the API returns a 401 or 403, the allowed-origin header is not sent back with the response. What I understand from the front end team here, is that this causes trouble because the browser and/or angular can't process the XHR response because it doesn't know if it is allowed to...
Does anyone knows why API management behaves like this and how I can prevent this?
Many thanks!
Peter