Skip to content

Commit d43d8bb

Browse files
committed
update:更新小版本
去除多线程代理解析时候的url双层解码和请求头双层解码,试图解决容易出现403的问题
1 parent ed5825b commit d43d8bb

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/nodejs/dist/
33
/.idea/
44
/nodejs/vod_cache
5+
/nodejs/yarn.lock

Diff for: nodejs/source/ds-cat.20250123-2.7z

504 KB
Binary file not shown.

Diff for: nodejs/src/router.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,10 @@ export default async function router(fastify) {
205205
}
206206

207207
// 解码 URL 和 Header
208-
const decodedUrl = decodeURIComponent(url);
209-
const decodedHeader = header ? JSON.parse(decodeURIComponent(header)) : {};
208+
// const decodedUrl = decodeURIComponent(url);
209+
const decodedUrl = url;
210+
// const decodedHeader = header ? JSON.parse(decodeURIComponent(header)) : {};
211+
const decodedHeader = header ? JSON.parse(header) : {};
210212

211213
// 获取当前请求头
212214
const currentHeaders = request.headers;
@@ -256,7 +258,7 @@ export default async function router(fastify) {
256258
// 处理选项
257259
const option = {
258260
chunkSize: chunkSize ? 1024 * parseInt(chunkSize, 10) : 1024 * 256,
259-
poolSize: thread ? parseInt(thread, 10) : 5,
261+
poolSize: thread ? parseInt(thread, 10) : 6,
260262
timeout: 1000 * 10, // 默认 10 秒超时
261263
};
262264

0 commit comments

Comments
 (0)