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

Ignoring Proxy Config with React Native #1058

Closed
ghost opened this issue Aug 27, 2017 · 3 comments
Closed

Ignoring Proxy Config with React Native #1058

ghost opened this issue Aug 27, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 27, 2017

#### Summary

When trying to fetch to server with proxy, it just ignores proxy setting and fetch to server.
This problem already mentioned in this issue (#672)
But closed for some reason. and still occurred now.
I am using latest versions of react-native, and axios.
Here is my code below.

let config = {
      proxy: {
        host: '127.0.0.1',
        port: 8118
      }
    }
    axios.get('https://api.ipify.org/', config)
    .then(function (response) {
      console.log("-----------");
      console.log(response.data);
      console.log("-----------");
    })

Output: Original IP, not proxied one

#### Context

  • axios version: v0.16.2
  • Environment: node v.8.3.0, and react-native-cli 2.0.1
@robaxelsen
Copy link
Contributor

Closing, see duplicate.

@mrmarktyy
Copy link

mrmarktyy commented Aug 12, 2019

I am still having this issue with react-native 0.57.1 (Expo 32.0.0)

Anyone know an alternative to send http request with proxy in RN ?

@rishabhbhatia
Copy link

@mrmarktyy Hey Mark how did you manage to solve it?
I'm trying to call a proxy server from react-native and unable to do so, any help would be really appreciated.

@axios axios locked and limited conversation to collaborators May 22, 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

No branches or pull requests

3 participants