Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>http://www.your-site.com</AllowedOrigin>
<AllowedOrigin>https://www.your-site.com</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>HEAD</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
</CORSRule>
</CORSConfiguration>
@lacostenycoder

This comment has been minimized.

Copy link

@lacostenycoder lacostenycoder commented Dec 23, 2016

Nice thanks!

@maur1th

This comment has been minimized.

Copy link

@maur1th maur1th commented May 27, 2017

Great, thanks!

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Aug 27, 2017

It works! Thanks!

@collarbone

This comment has been minimized.

Copy link

@collarbone collarbone commented Oct 4, 2017

Nice!

@clint74

This comment has been minimized.

Copy link

@clint74 clint74 commented Dec 1, 2017

Great, thanks! Saved me hours.

@mj12albert

This comment has been minimized.

Copy link

@mj12albert mj12albert commented Jun 28, 2018

Can I have multiple <AllowedOrigin>s as long as they are all either https or http?

@greg-benner-klick-sensei

This comment has been minimized.

Copy link

@greg-benner-klick-sensei greg-benner-klick-sensei commented Sep 6, 2018

Can also <AllowedOrigin>*</AllowedOrigin> if you want any site to be able to access the asset

@chetan-kukadiya

This comment has been minimized.

Copy link

@chetan-kukadiya chetan-kukadiya commented Dec 6, 2018

Great, it's work for me. thanks

@samirtendulkar

This comment has been minimized.

Copy link

@samirtendulkar samirtendulkar commented May 19, 2019

Thanks Dude you're the best

@Ralpharama

This comment has been minimized.

Copy link

@Ralpharama Ralpharama commented Jun 19, 2019

Thanks :) Very useful

@guglielmo

This comment has been minimized.

Copy link

@guglielmo guglielmo commented Apr 1, 2021

In the new AWS S3 console, the configuration must be passed in JSON format,
that would be:

[
    {
        "AllowedOrigins": [
            "https://www.your-site.com<",
            "http://www.your-site.com<",
            "http://checknews.openpolis.it",
            "https://checknews.openpolis.it"
        ],
        "AllowedMethods": [
            "POST",
            "GET",
            "PUT"
        ]
    }
]
@hsb-tonmoy

This comment has been minimized.

Copy link

@hsb-tonmoy hsb-tonmoy commented Apr 25, 2021

In the new AWS S3 console, the configuration must be passed in JSON format,
that would be:

[
    {
        "AllowedOrigins": [
            "https://www.your-site.com<",
            "http://www.your-site.com<",
            "http://checknews.openpolis.it",
            "https://checknews.openpolis.it"
        ],
        "AllowedMethods": [
            "POST",
            "GET",
            "PUT"
        ]
    }
]

Thanks man!

@dtheekshanalinux

This comment has been minimized.

Copy link

@dtheekshanalinux dtheekshanalinux commented Jul 29, 2021

@guglielmo it's still not working.Do you have another suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment