Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

Merge commit from fork

Kim SooHyun8d59583dca16
diff --git a/packages/web-crawler/package.json b/packages/web-crawler/package.json
old mode 100644
new mode 100755
index 1c1a59f9b7f..09e1b6d0eb8
--- a/packages/web-crawler/package.json
+++ b/packages/web-crawler/package.json
@@ -12,6 +12,7 @@
"@mozilla/readability": "^0.6.0",
"happy-dom": "^18.0.0",
"node-html-markdown": "^1.3.0",
+ "ssrf-safe-fetch": "workspace:*",
"query-string": "^9.1.1",
"url-join": "^5"
}
diff --git a/packages/web-crawler/src/crawImpl/naive.ts b/packages/web-crawler/src/crawImpl/naive.ts
old mode 100644
new mode 100755
index 606ed783c2a..5a20ef8135a
--- a/packages/web-crawler/src/crawImpl/naive.ts
+++ b/packages/web-crawler/src/crawImpl/naive.ts
@@ -1,4 +1,5 @@
import { CrawlImpl, CrawlSuccessResult } from '../type';
+import { ssrfSafeFetch } from 'ssrf-safe-fetch';
import { NetworkConnectionError, PageNotFoundError, TimeoutError } from '../utils/errorType';
import { htmlToMarkdown } from '../utils/htmlToMarkdown';
import { DEFAULT_TIMEOUT, withTimeout } from '../utils/withTimeout';
@@ -37,7 +38,7 @@ export const naive: CrawlImpl = async (url, { filterOptions }) => {
try {
res = await withTimeout(
- fetch(url, {
+ ssrfSafeFetch(url, {
headers: mixinHeaders,
signal: new AbortController().signal,
}),