S3 CORS Config For Django

Hi so i was following this video but i cannot pass his config in the CORS part of s3 permissions. any help please. It does say it should be valid JSON (But dont want to mess anything up)

His CODE:

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

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

`<CORSRule>`

`<AllowedOrigin>*</AllowedOrigin>`

`<AllowedMethod>GET</AllowedMethod>`

`<AllowedMethod>POST</AllowedMethod>`

`<AllowedMethod>PUT</AllowedMethod>`

`<AllowedHeader>*</AllowedHeader>`

`</CORSRule>`

`</CORSConfiguration>`

The VIDEO: https://www.youtube.com/watch?v=kt3ZtW9MXhw

First, this isn’t a Django issue. We’ll try to help here, but you might get better / more accurate answers from an AWS-related forum.

I don’t know if you’ve added those backticks at the beginning and end of each line for the purposes of this forum, but make sure they’re not present when you’re adding these lines in the AWS console.

Also, this isn’t JSON, this is XML.

1 Like

hi thanks, i solved it just had to change it to json format :slight_smile:
Silly me .

thanks for your help :slight_smile: