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

Need HttpsProxyAgent to support setting the CA Cert #234

Open
robertpatrick opened this issue Aug 11, 2023 · 1 comment
Open

Need HttpsProxyAgent to support setting the CA Cert #234

robertpatrick opened this issue Aug 11, 2023 · 1 comment

Comments

@robertpatrick
Copy link

I have existing code that uses https.Agent doing the following and it is working when not on my company network:

import { Agent } from 'https';

...

const agent = new Agent({ ca: caCert });

const config: AxiosRequestConfig = {
  httpsAgent: agent
  headers: {
    Authorization: `Bearer ${ token }`,
    Cookie:        getHeader(event, 'cookie'),
  },
};
const res = await axios.get(`${ adminClusterBaseUrl }/version`, config);

I tried swapping out https.Agent with HttpsProxyAgent and passing the proxy URL and the same options to the constructor but I am getting an error that seems to indicate that it is not honoring the ca attribute.

@sibelius
Copy link

is there a plan for this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants