booster icon indicating copy to clipboard operation
booster copied to clipboard

[Question] - How to configure CORS for AWS

Open LaiaPerez88 opened this issue 4 years ago • 2 comments

Apollo Sandbox Explorer (https://studio.apollographql.com/sandbox/explorer) cannot connect to the AWS gateway. This will also be the case for any other hosted front-end application which needs to connect to the API.

LaiaPerez88 avatar Jul 27 '21 16:07 LaiaPerez88

@thomas-advantitge, Could you please provide more detail on the error you got so we can help you? We tried on that page with our AWS application and it was working fine.

LaiaPerez88 avatar Jul 27 '21 16:07 LaiaPerez88

After investigation it appears to happen when internal server errors occur. When everything runs stable, the CORS headers are indeed returned and everything works fine.

Could be a minor improvement to also return the headers regardless of status code. It would mainly help users who are not familiar with AWS and who try to deploy Booster for the first time. If an error was made in the implementation, the internal server error is not clearly visible in online GraphQL tools like Apollo Studio due to the fact that the CORS error appears first.

thomas-advantitge avatar Aug 03 '21 12:08 thomas-advantitge