I am facing cors issue on my website deployed on amazon aws.
The frontend is deployed using S3 + Cloudfront (URL: https://example.com)
Backend is deployed on EC2, with Load Balancer. (URL: https://api.example.com)
Now when my frontend angular app hit request on the api, it doesn't work in the first go, and throw the cors error like this:
Now when i refresh the same page, It works fine. This is after refresh api calls: