Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a way to disable all proxy processing #691

Merged
merged 2 commits into from
Aug 14, 2017

Conversation

vbfox
Copy link
Contributor

@vbfox vbfox commented Feb 7, 2017

When the proxy field in configuration is === false all proxy processing is disabled. This specifically disable the 'http_proxy' environment variable handling.

It should fix #635 and possibly #434 too (That issue suggest 2 different solutions, the other being already in PR #565).
PR #565 is complementary to this one as it add handling of the no_proxy environment variable.

I created this PR to fix ionide/ionide-vscode-fsharp#272

@coveralls
Copy link

Coverage Status

Coverage increased (+1.5%) to 93.687% when pulling d7bd29a on vbfox:disable_proxy into 5630d3b on mzabriskie:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.5%) to 93.687% when pulling 9373bf9 on vbfox:disable_proxy into 5630d3b on mzabriskie:master.

README.md Outdated
@@ -303,6 +303,8 @@ These are the available config options for making requests. Only the `url` is re
httpsAgent: new https.Agent({ keepAlive: true }),

// 'proxy' defines the hostname and port of the proxy server
// On node the proxy can also come from the 'http_proxy' environment variable.
// Use false to disable all proxy handling.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be simpler just saying:

// Use `false` to disable proxies, ignoring environment variables.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vbfox would you mind changing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rubennorte done.

When the proxy field in configuration is === false all proxy processing is
disabled. This specifically disable the 'http_proxy' environment variable
handling.

Fixes axios#635
Related to axios#434
@coveralls
Copy link

Coverage Status

Coverage increased (+1.5%) to 93.719% when pulling ba594bb on vbfox:disable_proxy into f31317a on mzabriskie:master.

@axe312ger
Copy link
Contributor

LGTM, please merge, confuses a lot of our customers since other tools also use http_proxy environment variables.

From review comment on PR (axios#691)
@coveralls
Copy link

Coverage Status

Coverage increased (+1.6%) to 93.812% when pulling db8457c on vbfox:disable_proxy into f31317a on mzabriskie:master.

@rubennorte rubennorte merged commit 07a7b7c into axios:master Aug 14, 2017
@rubennorte
Copy link
Member

Thanks for your contribution.

GulajavaMinistudio added a commit to javascript-indonesias/axios that referenced this pull request Aug 15, 2017
Adding a way to disable all proxy processing (axios#691)
@nareshbhatia
Copy link

@rubennorte, any chance you will make a release with just this merge? This will allow us to at least start using Axios again. In it's current state it is unusable because it is picking up on HTTP_PROXY, but not on NO_PROXY. When #565 is merged we can switch over to recognizing both again.

@vbfox vbfox deleted the disable_proxy branch April 9, 2018 08:18
jimthedev referenced this pull request in commitizen/cz-cli May 24, 2018
This Pull Request updates dependency [axios](https://github.com/axios/axios) from `v0.15.2` to `v0.18.0`



<details>
<summary>Release Notes</summary>

### [`v0.18.0`](https://github.com/axios/axios/blob/master/CHANGELOG.md#&#8203;0180-Feb-19-2018)
[Compare Source](axios/axios@v0.17.1...v0.18.0)
- Adding support for UNIX Sockets when running with Node.js ([#&#8203;1070](`https://github.com/axios/axios/pull/1070`))
- Fixing typings ([#&#8203;1177](`https://github.com/axios/axios/pull/1177`)):
    - AxiosRequestConfig.proxy: allows type false
    - AxiosProxyConfig: added auth field
- Adding function signature in AxiosInstance interface so AxiosInstance can be invoked ([#&#8203;1192](`https://github.com/axios/axios/pull/1192`), [#&#8203;1254](`https://github.com/axios/axios/pull/1254`))
- Allowing maxContentLength to pass through to redirected calls as maxBodyLength in follow-redirects config ([#&#8203;1287](`https://github.com/axios/axios/pull/1287`))
- Fixing configuration when using an instance - method can now be set ([#&#8203;1342](`https://github.com/axios/axios/pull/1342`))

---

### [`v0.17.1`](https://github.com/axios/axios/blob/master/CHANGELOG.md#&#8203;0171-Nov-11-2017)
[Compare Source](axios/axios@v0.17.0...v0.17.1)
- Fixing issue with web workers ([#&#8203;1160](`https://github.com/axios/axios/pull/1160`))
- Allowing overriding transport ([#&#8203;1080](`https://github.com/axios/axios/pull/1080`))
- Updating TypeScript typings ([#&#8203;1165](`https://github.com/axios/axios/pull/1165`), [#&#8203;1125](`https://github.com/axios/axios/pull/1125`), [#&#8203;1131](`https://github.com/axios/axios/pull/1131`))

---

### [`v0.17.0`](https://github.com/axios/axios/blob/master/CHANGELOG.md#&#8203;0170-Oct-21-2017)
[Compare Source](axios/axios@v0.16.2...v0.17.0)
- **BREAKING** Fixing issue with `baseURL` and interceptors ([#&#8203;950](`https://github.com/axios/axios/pull/950`))
- **BREAKING** Improving handing of duplicate headers ([#&#8203;874](`https://github.com/axios/axios/pull/874`))
- Adding support for disabling proxies ([#&#8203;691](`https://github.com/axios/axios/pull/691`))
- Updating TypeScript typings with generic type parameters ([#&#8203;1061](`https://github.com/axios/axios/pull/1061`))

---

### [`v0.16.2`](https://github.com/axios/axios/blob/master/CHANGELOG.md#&#8203;0162-Jun-3-2017)
[Compare Source](axios/axios@v0.16.1...v0.16.2)
- Fixing issue with including `buffer` in bundle ([#&#8203;887](`https://github.com/axios/axios/pull/887`))
- Including underlying request in errors ([#&#8203;830](`https://github.com/axios/axios/pull/830`))
- Convert `method` to lowercase ([#&#8203;930](`https://github.com/axios/axios/pull/930`))

---

### [`v0.16.1`](https://github.com/axios/axios/blob/master/CHANGELOG.md#&#8203;0161-Apr-8-2017)
[Compare Source](axios/axios@v0.16.0...v0.16.1)
- Improving HTTP adapter to return last request in case of redirects ([#&#8203;828](`https://github.com/axios/axios/pull/828`))
- Updating `follow-redirects` dependency ([#&#8203;829](`https://github.com/axios/axios/pull/829`))
- Adding support for passing `Buffer` in node ([#&#8203;773](`https://github.com/axios/axios/pull/773`))

---

### [`v0.16.0`](https://github.com/axios/axios/blob/master/CHANGELOG.md#&#8203;0160-Mar-31-2017)
[Compare Source](axios/axios@v0.15.3...v0.16.0)
- **BREAKING** Removing `Promise` from axios typings in favor of built-in type declarations ([#&#8203;480](`https://github.com/axios/axios/issues/480`))
- Adding `options` shortcut method ([#&#8203;461](`https://github.com/axios/axios/pull/461`))
- Fixing issue with using `responseType: 'json'` in browsers incompatible with XHR Level 2 ([#&#8203;654](`https://github.com/axios/axios/pull/654`))
- Improving React Native detection ([#&#8203;731](`https://github.com/axios/axios/pull/731`))
- Fixing `combineURLs` to support empty `relativeURL` ([#&#8203;581](`https://github.com/axios/axios/pull/581`))
- Removing `PROTECTION_PREFIX` support ([#&#8203;561](`https://github.com/axios/axios/pull/561`))

---

### [`v0.15.3`](https://github.com/axios/axios/blob/master/CHANGELOG.md#&#8203;0153-Nov-27-2016)
[Compare Source](axios/axios@v0.15.2...v0.15.3)
- Fixing issue with custom instances and global defaults ([#&#8203;443](`https://github.com/axios/axios/issues/443`))
- Renaming `axios.d.ts` to `index.d.ts` ([#&#8203;519](`https://github.com/axios/axios/issues/519`))
- Adding `get`, `head`, and `delete` to `defaults.headers` ([#&#8203;509](`https://github.com/axios/axios/issues/509`))
- Fixing issue with `btoa` and IE ([#&#8203;507](`https://github.com/axios/axios/issues/507`))
- Adding support for proxy authentication ([#&#8203;483](`https://github.com/axios/axios/pull/483`))
- Improving HTTP adapter to use `http` protocol by default ([#&#8203;493](`https://github.com/axios/axios/pull/493`))
- Fixing proxy issues ([#&#8203;491](`https://github.com/axios/axios/pull/491`))

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
@codeangler
Copy link

thank you @vbfox and others for this additional feature.

@Alanscut Alanscut mentioned this pull request Nov 20, 2019
@axios axios locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there a way to force not to use proxy? Can't connect to FSAC if HTTP_PROXY is defined.
6 participants