-
Notifications
You must be signed in to change notification settings - Fork 10
Description
I have an FE app in Angular which is consuming the Amazon Hub Counter API.
In order to make tests over the sandbox URL of the Amazon Hub Counter API (https://accesspoints-api-sandbox-na.amazon.com/v1) I deployed my FE to a S3 bucket, the app is working fine, but when I try to consume any endpoint from the sandbox URL I'm getting the following CORS error:
As you can see the GET token endpoint is passing successfully since this endpoint lives in a different url (https://api.amazon.com/auth/o2/token) but any request to the sandbox URL is failing due to this CORS error.
Any ideas how to solve this?
BTW, this error is not happening if I test the Angular app running locally, I mean, when the FE is deployed to localhost:4200, in this way the sandbox URL is respoding correctly. Could it be an issue of how the sandbox server is configured? I mean is this only accepting requests from localhost? Also when using POSTMAN the requests are passing successfully, the only problem comes when I try to consume from an external S3 bucket ex. http://counter-staging.s3-website.us-east-2.amazonaws.com/