From cbb3d1198bd553fe8a427f0106358b3f9ee2a4e3 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sun, 24 Dec 2017 22:21:30 -0500 Subject: [PATCH] Add .htaccess to fix CORS issue --- .htaccess | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 00000000..6afbed06 --- /dev/null +++ b/.htaccess @@ -0,0 +1,11 @@ +# JSMediaTags, which we use for parsing ID3 tags, requires some additional +# headers be enabled when accessing the media file from another origin. Since +# the media files, in our case, are served from a CDN, Amazon CloudFront, on +# a different domain, we are subject to the CORS restrictions. +# +# CloudFront is just a caching layer that sits in front of jordaneldredge.com, +# so we must serve these original files with the correct headers in order for +# CloudFront to return the correct headers. +# +# https://github.com/aadsm/jsmediatags#http-access-control-cors +Header add Access-Control-Allow-Headers "if-modified-since, range"