CORS Preflight error while trying to use Oracle Chat REST API
I am trying to make an ajax call to the requestEngagement endpoint using the Chat REST API. However, I am seeing the following error :-
Access to XMLHttpRequest at 'https://****.rightnowtech.com/engagement/api/consumer/<site_name>/v1/requestEngagement?pool=<pool>'; from origin 'https://www.mywebsite.com'; has been blocked by CORS policy: Request header field osvc-crest-application-context is not allowed by Access-Control-Allow-Headers in preflight response.
If I remove the osvc-crest-application-context from the headers, I am getting a 400 Bad Request error message. From the preflight response from the server, I can see that only following headers are expected by the server.