react-collider
Advanced tools
Comparing version
@@ -34,3 +34,3 @@ 'use strict'; | ||
} else { | ||
request('GET', url).send().set('Accept', 'application/json').end(function (err, res) { | ||
request('GET', url).timeout(2000).send().set('Accept', 'application/json').end(function (err, res) { | ||
if (err) { | ||
@@ -37,0 +37,0 @@ console.error(err); |
{ | ||
"name": "react-collider", | ||
"version": "1.10.1", | ||
"version": "1.10.2", | ||
"description": "Express middleware for isomorphic express + react apps", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -24,2 +24,3 @@ import request from 'superagent' | ||
request('GET', url) | ||
.timeout(2000) | ||
.send() | ||
@@ -30,4 +31,9 @@ .set('Accept', 'application/json') | ||
console.error(err) | ||
console.log(url) | ||
resolve('') | ||
resolve({ | ||
error: { | ||
code: 'timeout', | ||
message: `This request has timed-out: ${url}`, | ||
type: 'timeout' | ||
} | ||
}) | ||
} | ||
@@ -34,0 +40,0 @@ else { |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
37835
0.66%816
0.74%