Comparing version 2.0.5 to 2.0.6
@@ -53,3 +53,4 @@ const Stream = require('stream'); | ||
const resHeaders = proxyRes ? proxyRes.headers : res.getHeaders(); | ||
// const resHeaders = proxyRes ? proxyRes.headers : res.getHeaders(); | ||
const resHeaders = res.getHeaders(); | ||
const mimeType = getMimeType(resHeaders); | ||
@@ -56,0 +57,0 @@ const type = getResourceType(mimeType); |
@@ -46,3 +46,3 @@ | ||
res.on('error', err => { | ||
console.error('res error', err); | ||
console.error('res error', err.code || ''); | ||
}); | ||
@@ -52,3 +52,3 @@ resolve({ req, res }); | ||
req.on('error', err => { | ||
console.error('req error', dest.href, err); | ||
console.error('req error', dest.href, err.code || ''); | ||
reject(err); | ||
@@ -55,0 +55,0 @@ }); |
@@ -25,6 +25,6 @@ | ||
req.on('error', err => { | ||
console.warn('Verify host error', hostname, err.code); | ||
if (/UNABLE_TO_VERIFY_LEAF_SIGNATURE|DEPTH_ZERO_SELF_SIGNED_CERT|CERT_HAS_EXPIRED/.test(err.code)) { | ||
resolve(false); | ||
} else { | ||
console.warn('Verify host error', hostname, err); | ||
resolve(true); | ||
@@ -31,0 +31,0 @@ } |
{ | ||
"name": "feproxy", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "An node proxy server for web development", | ||
@@ -5,0 +5,0 @@ "scripts": { |
842009
2913