Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Data Type Mismatch and Policies must be valid JSON and the first byte must be '{'

I need to make a CORS Policy for my S3 Bucket.

In the console, it says the policy has to be valid JSON. I copy and paste their examples and immediately it errors stating they’re formatted improperly. This is basically what I’m trying:

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "POST"
        ],
        "AllowedOrigins": [
            "https://localhost:3000",
            "https://mywebsite.com",
        ]
    }
]

Apparently something is wrong:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

>Solution :

The CORS policy is a standalone policy that needs to be specified in the origin resource sharing (CORS) for the bucket. You need to enter the policy that you have there.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading