(zone)
| 15 | const formatHostName = (hostname) => hostname.replace(/^\.*/, '.').toLowerCase() |
| 16 | |
| 17 | const parseNoProxyZone = (zone) => { |
| 18 | zone = zone.trim() |
| 19 | const zoneParts = zone.split(':', 2) |
| 20 | const zoneHost = formatHostName(zoneParts[0]) |
| 21 | const zonePort = zoneParts[1] |
| 22 | const hasPort = zone.indexOf(':') > -1 |
| 23 | return { hostname: zoneHost, port: zonePort, hasPort } |
| 24 | } |
| 25 | |
| 26 | const shouldBypassProxy = (requestURL) => { |
| 27 | const noProxy = process.env.NO_PROXY || process.env.no_proxy || '' |
nothing calls this directly
no test coverage detected
searching dependent graphs…