From ec2514735ab473e77ecee98196434c311da767da Mon Sep 17 00:00:00 2001 From: "B.J. Rossiter" Date: Mon, 15 Oct 2012 11:37:07 +1100 Subject: [PATCH] Deploy script sets mime type and CORS headers for fonts --- deploy.js | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy.js b/deploy.js index 8c9f780..c0ee28f 100755 --- a/deploy.js +++ b/deploy.js @@ -54,8 +54,10 @@ function cdnSync(cb){ container: container, auth : { username: 'theglobalmail', apiKey: argv.key}, cdnEnabled: true, - pushOnBoot: true + pushOnBoot: true, + headers: { '\\.(eot|svg|ttf|woff)$': ['Access-Control-Allow-Origin: *'] } }); + mirror.mime.define({'application/octet-stream': ['woff']}); mirror.on('error', next); mirror.on('end', function(err){ console.error(('Syncing ' + dir + ' to ' + container + ' OK').green) diff --git a/package.json b/package.json index 30584b6..f11cfaa 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "nopt": "~2.0.0", "should": "~1.1.0", "async": "~0.1.22", - "cloudfiles-mirror": "git://github.com/bxjx/cloudfiles-mirror.git#emit_end", + "cloudfiles-mirror": "git://github.com/bxjx/cloudfiles-mirror.git", "colors": "~0.6.0-1", "optimist": "~0.3.4" },