Skip to content

Commit 0f82890

Browse files
committed
Add crawler User-Agent header
@pandadtdyy 老师请求添加 bot UA 暂定所有 UA 均以 `LDABot` 开头,后续可能添加细分分类
1 parent 677d8b7 commit 0f82890

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/archive/src/lib/parser.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export async function getResponse(
3131
headers: {
3232
"x-luogu-type": "content-only",
3333
"x-lentille-request": "content-only",
34+
"User-Agent": "LDABot",
35+
3436
...(cookie ? { cookie: process.env.COOKIE! } : {}),
3537
},
3638
cache: "no-cache",

0 commit comments

Comments
 (0)