When I do network inspect I am seeing CORS error in the network trace.
However, when I check the same call in Apigee debug trace I can see it is completed with 200 response.
There are two calls in both the traces . One is preflight and other is the main GET call.
In Apigee trace both the call responses are 200.
However in network trace, preflight is giving 200 response, but the main call gives CORS error. I have already added CORS policy in preflow response of target endpoint and also have separate conditional flow for option preflight.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="add-cors">
<DisplayName>AM-AddCors</DisplayName>
<FaultRules/>
<Properties/>
<Add>
<Headers>
<Header name="Access-Control-Allow-Origin">*</Header>
<Header name="Access-Control-Allow-Headers">Authorization, origin, x-requested-with, accept, Content-Type</Header>
<Header name="Access-Control-Max-Age">3628800</Header>
<Header name="Access-Control-Allow-Methods">GET,PUT,POST,DELETE,HEAD,OPTIONS</Header>
</Headers>
</Add>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="response"/>
</AssignMessage>