Does Amazon S3 allow custom headers? Or am I out of luck?
Access-Control-Allow-Origin: * Access-Control-Allow-Methods: POST, GET, OPTIONS Access-Control-Allow-Headers: X-SOMETHING Access-Control-Max-Age: 1728000
Example
var request = new XMLHttpRequest(); var url = 'http://example.s3.amazonaws.com/templates/welcome.html'; function callOtherDomain(){ request.open('GET', url, true); request.withCredentials = "true"; request.onreadystatechange = handler; request.send(); }
Cross-origin resource sharing (CORS) defines a way for client web applications that are loaded in one domain to interact with resources in a different domain. With CORS support, you can build rich client-side web applications with Amazon S3 and selectively allow cross-origin access to your Amazon S3 resources.
Cross-Origin Resource Sharing (CORS) is a protocol that enables scripts running on a browser client to interact with resources from a different origin.
CORS is now officially supported on S3: http://docs.amazonwebservices.com/AmazonS3/latest/dev/cors.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With