Skip to content

Repository files navigation

no-proxy

Test URL against NO_PROXY environment variable.

console.log(process.env.NO_PROXY);// ".foo.com,*.bar.com,10.*,192.168.1."// requires protocolvarnoProxy=require('no-proxy');noProxy('http://foo.com/');// truenoProxy('http://www.baz.com/');// false// check hostname part onlyvarnoProxyHost=require('no-proxy/hostname');noProxyHost('foo.com');// truenoProxyHost('baz.com');// falsenoProxyHost('192.168.1.1');// true

NOTE: You may want to use memoization around this module.

WARNING

If you are using a node version prior to Node 8, you need to install url-parse as a dependency.

About

Use test URL against NO_PROXY

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages