I'm using S3 for storing generated HTML and JS files (from an EC2 instance).
I'm trying to make AJAX requests from these JS files to my PHP files on my EC2 instance. So, I've added this line to my htaccess: Header set Access-Control-Allow-Origin *
When I test locally, AJAX requests are made from S3 to my localhost, it works perfectly. But when I try to make these requests to EC2 I get the "not allowed by Access-Control-Allow-Origin" message...
Does anyone know if it's possible to do such a thing ? If not is there anyway to dynamically load content to S3 files ?
Thanks