feat: keep axios defaults for instances

This commit is contained in:
Ali BARIN
2024-02-23 18:02:33 +00:00
parent fcf345abab
commit f2e22e7445

View File

@@ -2,7 +2,7 @@ import axios from 'axios';
import { HttpsProxyAgent } from 'https-proxy-agent'; import { HttpsProxyAgent } from 'https-proxy-agent';
import { HttpProxyAgent } from 'http-proxy-agent'; import { HttpProxyAgent } from 'http-proxy-agent';
const config = {}; const config = axios.defaults;
const httpProxyUrl = process.env.http_proxy; const httpProxyUrl = process.env.http_proxy;
const httpsProxyUrl = process.env.https_proxy; const httpsProxyUrl = process.env.https_proxy;
const supportsProxy = httpProxyUrl || httpsProxyUrl; const supportsProxy = httpProxyUrl || httpsProxyUrl;