Skip to content

Instantly share code, notes, and snippets.

@mariovisic
Created February 10, 2013 08:57
Show Gist options
  • Save mariovisic/4748919 to your computer and use it in GitHub Desktop.
Save mariovisic/4748919 to your computer and use it in GitHub Desktop.
CORS for fonts on AWS S3
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>https://www.desktoppr.co</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>315576000</MaxAgeSeconds>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
curl -I -H "Origin: https://www.desktoppr.co" \
-H "Access-Control-Request-Method: GET" \
-H "Access-Control-Request-Headers: X-Requested-With" \
-X OPTIONS \
https://a.desktopprassets.com/assets/fontawesome-webfont-a16deda648110d250b072cfdf2ae0f14.woff
HTTP/1.1 200 OK
Server: cloudflare-nginx
Date: Sun, 10 Feb 2013 08:56:54 GMT
Content-Length: 0
Connection: keep-alive
x-amz-id-2: czh6oH1HPYu45Gz/GAoRl/4u2nXJFurElS2nab9YOVd8IEaLY1r48D99YO3REkuM
x-amz-request-id: 8FADA9437690321E
Access-Control-Allow-Origin: https://www.desktoppr.co
Access-Control-Allow-Methods: GET
Access-Control-Allow-Headers: x-requested-with
Access-Control-Max-Age: 315576000
Access-Control-Allow-Credentials: true
Expires: Sun, 10 Feb 2013 12:56:54 GMT
Cache-Control: public, max-age=14400
Set-Cookie: __cfduid=dcc9c023c2ae3e3bc66563d99ea257ff21360486613; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.desktopprassets.com
CF-RAY: 3e814d3c4ef04c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment