adobe / reactor-sdk-javascript

JavaScript SDK for the Reactor API
Apache License 2.0
12 stars 10 forks source link

[Question] 'http://localhost:3000' has been blocked by CORS policy #56

Closed stk26kakarla closed 4 years ago

stk26kakarla commented 4 years ago

The request URL I am accessing works with node-fetch and Postman. And when I try the same URL and Access Token the SDK throws the error: Access to fetch at 'https://reactor.adobe.io/companies' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field cache-control is not allowed by Access-Control-Allow-Headers in preflight response.

I am sure that there are Header differences, but how can I add the headers in this SDK? Is there anyway to not block the localhost environment?

thebenrob commented 4 years ago

If you're running a local server, then you'll have to fix the CORS headers on that local server to fix this. You may want to check out a couple links to help you with this: