1 Answer
- Newest
- Most votes
- Most comments
0
The web service running on the EC2 instances is using an endpoint to make its services available to calling clients. Whatever you are using to create these endpoints typically has a CORS on/off setting. Additionally, there is usually a policy associated with this setting that lists what origins are allowed to call the web service. This list of domains is configured somewhere in the code or a config file. What the service endpoint on the ec2 instance receives a request, it will check its CORS domain list and only send a CORS header for that specific domain if it is in the list. Here is a link to how you enable CORS in ASP.Net Core. It may be similar for the language you are using.
answered 6 months ago
Relevant content
- asked 5 years ago
- asked 3 years ago
- asked 2 months ago
- asked 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago