Compare commits

...

1 Commits

Author SHA1 Message Date
gauthier-th
79951e1c20 fix(proxy): apply authentication
This PR applies the authentication to the HTTP Proxy inside the default Agent used by Axios.
2025-06-21 15:43:58 +02:00

View File

@@ -70,8 +70,12 @@ export default async function createCustomProxyAgent(
setGlobalDispatcher(proxyAgent.compose(noProxyInterceptor));
axios.defaults.httpAgent = new HttpProxyAgent(proxyUrl);
axios.defaults.httpsAgent = new HttpsProxyAgent(proxyUrl);
axios.defaults.httpAgent = new HttpProxyAgent(proxyUrl, {
headers: { 'proxy-authorization': token },
});
axios.defaults.httpsAgent = new HttpsProxyAgent(proxyUrl, {
headers: { 'proxy-authorization': token },
});
axios.interceptors.request.use((config) => {
if (config.url && skipUrl(config.url)) {
config.httpAgent = false;