Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in AWS by (19.1k points)

Did anyone manage to add Access-Control-Allow-Origin to the response headers? What I need is something like this:

<img src="image_url" />

This get request should contain in the response, header, Access-Control-Allow-Origin: *

My CORS settings for the bucket looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">

    <CORSRule>

        <AllowedOrigin>*</AllowedOrigin>

        <AllowedMethod>GET</AllowedMethod>

        <MaxAgeSeconds>3000</MaxAgeSeconds>

        <AllowedHeader>*</AllowedHeader>

    </CORSRule>

</CORSConfiguration>

As you might expect there is no Origin response header.

1 Answer

0 votes
by (44.3k points)

This documentation has exactly what you need:

How Do I Allow Cross-Domain Resource Sharing with CORS?

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...