MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / shouldBypass

Function shouldBypass

src/utils/proxy-fetch.ts:60–72  ·  view source on GitHub ↗
(hostname: string, noProxy: string[])

Source from the content-addressed store, hash-verified

58}
59
60function shouldBypass(hostname: string, noProxy: string[]): boolean {
61 if (noProxy.length === 0) return false;
62 const h = hostname.toLowerCase();
63 for (const rule of noProxy) {
64 if (rule === '*') return true;
65 if (rule === h) return true;
66 // ".foo.com" or "foo.com" → match exact and suffix
67 const stripped = rule.startsWith('.') ? rule.slice(1) : rule;
68 if (h === stripped) return true;
69 if (h.endsWith('.' + stripped)) return true;
70 }
71 return false;
72}
73
74/**
75 * Resolve the right dispatcher for a given URL. Returns:

Callers 1

getDispatcherForUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected