Skip to content

Instantly share code, notes, and snippets.

@teddevaal
Created January 15, 2015 11:46
Show Gist options
  • Save teddevaal/17613b2ec3a5fab7fcd4 to your computer and use it in GitHub Desktop.
Save teddevaal/17613b2ec3a5fab7fcd4 to your computer and use it in GitHub Desktop.
Cors configuration
Test with curl
curl -H "Origin: http://www.example.nl" \
-H "Access-Control-Request-Method: GET" \
-H "Access-Control-Request-Headers: X-Requested-With" \
-X OPTIONS --verbose \
https://s3-eu-west-1.amazonaws.com/img.example.com.acceptance/public/css/glyphicons-halflings-regular.ttf
S3 Cors configuration
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*.example.com</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
<CORSRule>
<AllowedOrigin>*.example2.nl</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment