(key)
| 296 | // redirect proxying to an attacker-controlled host. |
| 297 | const isProxyURL = proxy instanceof URL; |
| 298 | const readProxyField = (key) => |
| 299 | isProxyURL || utils.hasOwnProp(proxy, key) ? proxy[key] : undefined; |
| 300 | |
| 301 | const proxyUsername = readProxyField('username'); |
| 302 | const proxyPassword = readProxyField('password'); |