function loopbackResolve(relativeURL) {
    const absoluteURL = URL.parse(URL.resolve(`${protocol}//localhost/`, relativeURL));
    const loopbackURL = Object.assign({}, absoluteURL, {
      hostname: absoluteURL.hostname,
      host:     hostname,
      port:     port
    });
    return loopbackURL;
  }
// and has the right hostname property to use in the Host header.
and has the right hostname property to use in the Host header.
and has the right hostname property to use in the Host header .
function loopbackResolve(relativeURL) {
    const absoluteURL = URL.parse(URL.resolve(`${protocol}//localhost/`, relativeURL));
    const loopbackURL = Object.assign({}, absoluteURL, {
      hostname: absoluteURL.hostname,
      host:     hostname,
      port:     port
    });
    return loopbackURL;
  }
function loopbackResolve ( relativeURL ) { const absoluteURL = URL . parse ( URL . resolve ( ` ${ protocol } ` , relativeURL ) ) ; const loopbackURL = Object . assign ( { } , absoluteURL , { hostname : absoluteURL . hostname , host : hostname , port : port } ) ; return loopbackURL ; }
and has the right hostname property to use in the Host header.
and has the right hostname property to use in the Host header .