jfrog / bower-art-resolver

Apache License 2.0
15 stars 17 forks source link

Let Request handle proxy based on env variables #20

Closed brunorubin closed 8 years ago

brunorubin commented 8 years ago

Currently the bower-art-resolver is failing when it runs in a server behind a proxy and needs to resolve any dependency that the source is set to NO_PROXY environment variable. As per investigation made by @monzonj in #9, removing the proxy entry from the request call let the request plugin to handle the environment variables to evaluate HTTP_PROXY, HTTPS_PROXY and NO_PROXY.

This change is a workaround to fix #9.

Scenario:

We want to use the bower-art-resolver to resolve some packages dependencies from our internal Artifactory registry. The server we are running is behind a HTTP proxy and our internal Artifactory shouldn't be routed via proxy so its address is set in the NO_PROXY environment variable.

Expected Result:

During the bower install command it is expected to have the NO_PROXY environment variable evaluated and the requests to the custom registry should bypass the proxy.

Actual Result:

During the bower install command the NO_PROXY environment variable is not evaluated and every request is going though the proxy causing the following error when trying to reach the internal artifactory:

ECONNRESET Request to https://internal-artifactory/artifactory/api/bower/bower-virtual/refs/facebook/react-bower failed: tunneling socket could not be established, cause=Parse Error
ghjunior commented 8 years ago

👍

eyalbe4 commented 8 years ago

Thank you for this @brunorubin! Can you please sign JFrog's CLA so that I can merge this PR?

brunorubin commented 8 years ago

@eyalbe4 Sure, it is already signed. Thanks.

jishaal commented 8 years ago

@eyalbe4, could we get a new release of this please?

eyalbe4 commented 8 years ago

Sure @jishaal. We'll soon create a release and let you know when it is published.

eyalbe4 commented 8 years ago

@jishaal, version 2.0.6 has just been published.

jishaal commented 8 years ago

Fantastic. Thanks heaps mate! @eyalbe4