fix(utils): request without hostname (#9649)

This commit is contained in:
Tony
2022-04-28 12:35:31 +01:00
committed by GitHub
parent 969df26d3d
commit 34b58ebc64

View File

@@ -125,7 +125,7 @@ const httpWrap = (func) => {
requestWrapper(url.toString(), request);
} else {
const req = url;
requestWrapper(req.url || req.href || `${req.protocol}//${req.hostname}${req.path}`, req);
requestWrapper(req.url || req.href || `${req.protocol}//${req.hostname || req.host}${req.path}`, req);
}
} else {
requestWrapper(url, request);