Default user agent.

This commit is contained in:
Thaddee Tyl 2015-06-06 13:31:08 +02:00
parent 4cc9ca9e2d
commit 0b2da246b7

View File

@ -225,6 +225,8 @@ function cache(f) {
} else {
options = uri;
}
options.headers = options.headers || {};
options.headers['User-Agent'] = options.headers['User-Agent'] || 'Shields.io';
return request(options, function(err, res, json) {
if (res != null && res.headers != null) {
var cacheControl = res.headers['cache-control'];