MCPcopy Index your code
hub / github.com/nodejs/node / checkShouldUseProxy

Function checkShouldUseProxy

lib/internal/http.js:239–249  ·  view source on GitHub ↗

* @param {ProxyConfig} proxyConfig * @param {object} reqOptions * @returns {boolean}

(proxyConfig, reqOptions)

Source from the content-addressed store, hash-verified

237 * @returns {boolean}
238 */
239function checkShouldUseProxy(proxyConfig, reqOptions) {
240 if (!proxyConfig) {
241 return false;
242 }
243 if (reqOptions.socketPath) {
244 // If socketPath is set, the endpoint is a Unix domain socket, which can't
245 // be proxied.
246 return false;
247 }
248 return proxyConfig.shouldUseProxy(reqOptions.host || 'localhost', reqOptions.port);
249}
250
251function filterEnvForProxies(env) {
252 return {

Callers 3

rewriteForProxiedHttpFunction · 0.85
_http_agent.jsFile · 0.85

Calls 1

shouldUseProxyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…