minify: Send a User-Agent header to avoid 403 responses from GitHub. [ci skip] [closes #255]

Former-commit-id: 1879b790b4ace543430edba6ae62d33c963f0344
This commit is contained in:
Kit Cambridge
2013-04-26 09:38:04 -07:00
parent 3508ce19f3
commit 90f8dbd86e

View File

@@ -310,7 +310,10 @@
// containing Base64-encoded blob data. Overriding the `Accept` header
// with the GitHub raw media type returns the blob data directly.
// See http://developer.github.com/v3/media/.
'Accept': mediaType
'Accept': mediaType,
// As of 2013-04-24, the GitHub API mandates the `User-Agent` header
// for all requests.
'User-Agent': 'Lo-Dash/' + _.VERSION
}
}, function(response) {
var decompressor = zlib.createUnzip(),