New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

agent-conditional

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

agent-conditional

Conditionally use an agent (maybe to connect to a proxy) or skip

unpublished
latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

How about wrapping up an http(s) , maybe proxy? , agent and checking wrt request whether to call the agent or not? Sounds good? This module doex exactly that!

Ex:

	const agent = new http.Agent(/* whatever ..... */);
	const newAgent = new ConditionalAgent(function cb(req, options) { /* Can be async */
	    return req.method === 'GET';
	}, agent);


	// Now use newAgent or override global as https.globalAgent = newAgent;

Keywords

proxy

FAQs

Package last updated on 08 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts