Http proxy no longer working with versions > 134.0.1

Hi,
There was a migration towards axios for versions greater than v134.0.1. Before that we used superagent-proxy to pass traffic through the superagent-proxy module.

Via code:
require('superagent-proxy')(client.superagent);

client.proxy = {
host: 'proxy.domain.com',
port: proxyport,
protocol: 'http',
};

So I tried to use the configuration as stated in the document by removing the superagent-proxy line.
This doesn't work in combination with a http proxy server (so https traffic over an http proxy server).

I had to change 2 files.

  1. purecloud-platform-client-v2.js
    FROM: var axios = require('axios');
    TO: var axios = require('axios-https-proxy-fix');

  2. purecloud-platform-client-v2/package.json (line 33)
    FROM: "axios": "^0.27.2",
    TO: "axios-https-proxy-fix": "^0.17.1",

I'm no expert but can you fix this in future releases so https request over http proxies can work again?

Thanks
Stijn Serry

1 Like

Hey there. I hope you've found a solution. If not, you should consider using a more specialized type of proxy, like proxies for market research, to ensure a more stable connection and better results. Those proxies helped us fix the same problem last month. We didn't expect that, tbh. Actually, you can never know what helps. Anyway, keep us updated if you find any other solutions or if the issue gets fixed in future releases. I'll be waiting for your reply.

I had to change 2 files.

I had to change following things to get this working again.

  1. purecloud-platform-client-v2.js
    FROM: var axios = require('axios');
    TO: var axios = require('axios-https-proxy-fix');
  2. purecloud-platform-client-v2/package.json (line 33)
    FROM: "axios": "^0.27.2",
    TO: "axios-https-proxy-fix": "^0.17.1",

I expected Genesys or the maintainer of this code to correct this in the main code so this manipulation doesn't need to take place after each new release...

This was broken for us starting from the version where superagent was deprecated on version 137.1.0

Axios has had this proxy bug for years and even with an open issue for 7 months

please consider exposing
httpAgent, httpsAgent

so we can override the HTTP agent ourselves to bypass this issue.

Hey guys,

Thanks for bringing this up. We will open a ticket, investigate a solution, and see what we can fix. Sorry for the pain this is causing.

Thanks,
John Carnell
Director, Developer Engagement.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.