Expand my Community achievements bar.

SOLVED

CORS Policy blocking when accessing Adobe Rest APIs : Cloud Manager API Adobe IO Project

Avatar

Level 3

i am getting error while accessing API for cloud Manager -  Adobe IO cloud Manager project has been setup in Adobe IO console works fine using Postman and getting expected response on the API call.

When i tried to replicate same in JS Code/Fetch call, getting below error 

has been blocked by CORS policy: Request header field access-control-allow-methods is not allowed by Access-Control-Allow-Headers in preflight response.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
2 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Community Advisor

You need to ensure:

  • CORS is set up correctly as mentioned by @Harwinder-singh.

  • Pay special attention to allowing the HTTP OPTIONS method, which is the type of method used for preflight operations.

  • Make sure the dispatcher allows CORS headers and does not block the OPTIONS method.

 



Esteban Bustamante