Note that there are some explanatory texts on larger screens.

plurals
  1. POAmazon S3 CORS Configuration XMLHttpRequest GET
    primarykey
    data
    text
    <p>I'm hosting a static website via Amazon S3 and I have some Javascript on there that will make a call to another domain and parse the XML, JSON, or whatever that it gets.</p> <p>I followed the many posts on stackoverflow and various blog posts it linked to that claimed to get it working but even after following very closely I could never replicate the results.</p> <pre><code> &lt;CORSRule&gt; &lt;AllowedOrigin&gt;*&lt;/AllowedOrigin&gt; &lt;AllowedMethod&gt;GET&lt;/AllowedMethod&gt; &lt;/CORSRule&gt; </code></pre> <p>I even tried adding with and without the following to the rule,</p> <pre><code> &lt;AllowedHeader&gt;*&lt;/AllowedHeader&gt; </code></pre> <p>The following link allows you to test if CORS is enabled by sending XMLHttpRequests and it says it is not valid so CORS is not set up or recognized properly.</p> <p><a href="http://client.cors-api.appspot.com/client/" rel="nofollow noreferrer">http://client.cors-api.appspot.com/client/</a></p> <p>A possible lead is what is suggested in Amazon S3 documentation here,</p> <p><a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETcors.html" rel="nofollow noreferrer">http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETcors.html</a></p> <p>that says we need to set the "s3:GetCORSConfiguration" permission, which I did via a line like...</p> <p>"Action": ["s3:GetObject", "s3:GetCORSConfiguration"],</p> <p>in the "edit bucket policy" section from the AWS control panel but it gives an error and cannot save because it doesn't recognize this action?</p> <p>A potentially similar post on stackexchange here,</p> <p><a href="https://stackoverflow.com/questions/11201738/http-get-to-amazon-aws-from-jquery-or-xmlhttprequest-fails-with-origin-is-not-al">HTTP GET to amazon aws from jquery or XMLHttpRequest fails with Origin is not allowed by Access-Control-Allow-Origin</a></p> <p>seems to suggest that if I have a website hosted on S3 that it can not configure it to make XMLHttpRequests that are GET to a 3rd party resource? </p> <p>I feel like I'm going in circles...anyone out there have any leads/advice? Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload