aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workers
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-11-02 21:00:52 +0000
committerMohamed Bassem <me@mbassem.com>2025-11-02 21:00:52 +0000
commit085c832c9ab6ada92e99a6987dcdf8bd67c3f317 (patch)
treefad7a5a0fd10304e958d66ba8ea312bd839119c7 /apps/workers
parent5358682a8cfbd12d93a4e9962f7a9f0440c42c19 (diff)
downloadkarakeep-085c832c9ab6ada92e99a6987dcdf8bd67c3f317.tar.zst
fix: fix monolith to respect crawler proxy
Diffstat (limited to 'apps/workers')
-rw-r--r--apps/workers/workers/crawlerWorker.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/workers/workers/crawlerWorker.ts b/apps/workers/workers/crawlerWorker.ts
index 70b2e644..ae7cfcab 100644
--- a/apps/workers/workers/crawlerWorker.ts
+++ b/apps/workers/workers/crawlerWorker.ts
@@ -807,6 +807,15 @@ async function archiveWebpage(
let res = await execa({
input: html,
cancelSignal: abortSignal,
+ env: {
+ https_proxy: serverConfig.proxy.httpsProxy
+ ? getRandomProxy(serverConfig.proxy.httpsProxy)
+ : undefined,
+ http_proxy: serverConfig.proxy.httpProxy
+ ? getRandomProxy(serverConfig.proxy.httpProxy)
+ : undefined,
+ no_proxy: serverConfig.proxy.noProxy?.join(","),
+ },
})("monolith", ["-", "-Ije", "-t", "5", "-b", url, "-o", assetPath]);
if (res.isCanceled) {