Skip to content

Commit

Permalink
Add crawler User-Agent header
Browse files Browse the repository at this point in the history
@pandadtdyy 老师请求添加 bot UA

暂定所有 UA 均以 `LDABot` 开头,后续可能添加细分分类
  • Loading branch information
wxh06 committed Jan 15, 2025
1 parent 677d8b7 commit 0f82890
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/archive/src/lib/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export async function getResponse(
headers: {
"x-luogu-type": "content-only",
"x-lentille-request": "content-only",
"User-Agent": "LDABot",
From: "lda@piterator.com",
...(cookie ? { cookie: process.env.COOKIE! } : {}),
},
cache: "no-cache",
Expand Down

0 comments on commit 0f82890

Please sign in to comment.