fernando
fernando

Reputation: 717

Communicate with API behind a proxy in Ionic

I am using ionic config as follows to connect with API. But the problem is I am behind a company proxy. As a result of it I can't connect to API.

{
  "proxies": [
    {
      "path": "/v1",
      "proxyUrl": "https://api.instagram.com/v1"
    }
  ]
}

For an example if the company proxy is 192.168.1.18:8080, how can get it working?

After reading the Ionic node module code I figured it out, Ionic is using proxyMiddleware to do the proxy. However I can't find a way to set proxy to proxyMiddleware node module.

Upvotes: 0

Views: 378

Answers (1)

Renatto Machado
Renatto Machado

Reputation: 1574

You can try use this library: https://github.com/nodejitsu/node-http-proxy

Upvotes: 2

Related Questions