diff --git a/lib/utils/request-wrapper.js b/lib/utils/request-wrapper.js index 38f20322da..962378964b 100644 --- a/lib/utils/request-wrapper.js +++ b/lib/utils/request-wrapper.js @@ -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);