MCPcopy Index your code
hub / github.com/serverless/serverless / parseNoProxyZone

Function parseNoProxyZone

packages/sf-core-installer/binary.js:17–24  ·  view source on GitHub ↗
(zone)

Source from the content-addressed store, hash-verified

15const formatHostName = (hostname) => hostname.replace(/^\.*/, '.').toLowerCase()
16
17const 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
26const shouldBypassProxy = (requestURL) => {
27 const noProxy = process.env.NO_PROXY || process.env.no_proxy || ''

Callers

nothing calls this directly

Calls 1

formatHostNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…