How to use 'axios https agent' in JavaScript

Every line of 'axios https agent' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
3export function getAgent(url, apiPath): https.Agent {
4 const isDev = process.env['WOLEET_ID_SERVER_PRODUCTION'];
5 if (isDev) {
6 const agentOptions = {
7 host:,
8 path: url.pathname + apiPath,
9 rejectUnauthorized: false
10 };
11 return new https.Agent(agentOptions);
12 }

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

17function HttpsOcspAgent(options)
19 return HttpsAgent.apply(this, arguments);

Related snippets