79500821

Date: 2025-03-11 12:58:49
Score: 0.5
Natty:
Report link

Adding on @Vikas's answer, you can implement more granular control in your S3 bucket CORS policy like this:

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "POST",
            "GET",
            "PUT"
        ],
        "AllowedOrigins": [
            "https://*.example.com",
            "http://localhost:*",
            "https://*.test.example.com"
        ],
        "ExposeHeaders": [
            "ETag",
            "Content-Length",
            "Content-Type"
        ],
        "MaxAgeSeconds": 3600
    }
]
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Vikas's
  • Low reputation (0.5):
Posted by: SKJ