Allow AJAX GETs from Amazon S3? (Access-Control-Allow-Origin)

后端 未结 11 1869
灰色年华
灰色年华 2020-12-23 16:34

I\'m storing JSON objects in Amazon S3, and I\'d like to load that data directly from S3 from Javascript. My GET looks pretty generic:

$.ajax({
    \'type\':         


        
11条回答
  •  误落风尘
    2020-12-23 17:25

    S3 now supports Cross Domain Requests using CORS file.

    You can find more information here:

    http://docs.amazonwebservices.com/AmazonS3/latest/dev/cors.html#how-do-i-enable-cors

    and:

    http://aws.typepad.com/aws/2012/08/amazon-s3-cross-origin-resource-sharing.html

提交回复
热议问题