I have a Angular App on AWS S3 and CloudFront and a Spring Boot backend app on Elastic Beanstalk.
Everything worked fine with uploading the files manual. After deploying the Angular app with Github Actions and jakejarvis/s3-sync-action and chetan/invalidate-cloudfront-action for the first time, I got CORS issues.
It seems the Browser can not read the 'Access-Control-Allow-Origin' header. Here is the error message:
Access to XMLHttpRequest at 'https://api.myapp.com/user-profiles' from origin 'https://www.myapp.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
The preflight response from the backend app looks good:
Pretty strange: The xhr request is pending exactly one minutes before it fails with 504!
