From e647b68131ce38cd0be07013789b4f885e8f171e Mon Sep 17 00:00:00 2001 From: Nazar Leush Date: Wed, 26 Jun 2024 23:12:49 +0300 Subject: [PATCH] bugfix using `DISABLE_PROXY_URL_FOR_ALL` e8b60dc3 lib/utils.js --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index 3c067a8b4..5babad87f 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -107,7 +107,7 @@ export function prepareRequestOptions(request_options, options) { : CONFIG.PROXY_URL + encodeURIComponent(uri); } else if (proxy.proxy_url && /{url}/.test(proxy.proxy_url)) { request_options.uri = proxy.proxy_url.replace(/{url}/, encodeURIComponent(uri)); - } else if (CONFIG.PROXY_URL_FOR_ALL && !options.DISABLE_PROXY_URL_FOR_ALL) { + } else if (CONFIG.PROXY_URL_FOR_ALL && !options?.DISABLE_PROXY_URL_FOR_ALL) { request_options.uri = /{url}/.test(CONFIG.PROXY_URL_FOR_ALL) ? CONFIG.PROXY_URL_FOR_ALL.replace(/{url}/, encodeURIComponent(uri)) : CONFIG.PROXY_URL_FOR_ALL + encodeURIComponent(uri);