Default user agent.
This commit is contained in:
parent
4cc9ca9e2d
commit
0b2da246b7
|
@ -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'];
|
||||
|
|
Loading…
Reference in New Issue
Block a user