booster
booster copied to clipboard
[Question] - How to configure CORS for AWS
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.
@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.
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.