MCPcopy
hub / github.com/continuedev/continue / shouldBypassProxy

Function shouldBypassProxy

packages/fetch/src/util.ts:96–108  ·  view source on GitHub ↗
(
  hostname: string,
  requestOptions: RequestOptions | undefined,
)

Source from the content-addressed store, hash-verified

94 * @returns True if the hostname should bypass proxy
95 */
96export function shouldBypassProxy(
97 hostname: string,
98 requestOptions: RequestOptions | undefined,
99): boolean {
100 const ignores = [
101 ...getEnvNoProxyPatterns(),
102 ...getReqOptionsNoProxyPatterns(requestOptions),
103 ];
104 const hostLowerCase = hostname.toLowerCase();
105 return ignores.some((ignore) =>
106 patternMatchesHostname(hostLowerCase, ignore),
107 );
108}

Callers 2

fetchwithRequestOptionsFunction · 0.85
util.test.tsFile · 0.85

Calls 3

getEnvNoProxyPatternsFunction · 0.85
patternMatchesHostnameFunction · 0.85

Tested by

no test coverage detected