From 265a1aad73a2b4be162bb41ab8ed0bbc2ed55a30 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Thu, 1 Aug 2024 18:58:28 +0800 Subject: [PATCH] fix(route/zhihu): Trim characters while extracting cookies (#16320) * Update utils.ts * Update utils.ts --- lib/routes/zhihu/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/routes/zhihu/utils.ts b/lib/routes/zhihu/utils.ts index d68387fe7..c530ab928 100644 --- a/lib/routes/zhihu/utils.ts +++ b/lib/routes/zhihu/utils.ts @@ -97,6 +97,7 @@ export const getSignedHeader = async (url: string, apiPath: string) => { const zc0 = config.zhihu.cookies ?.split(';') + .map((e) => e.trim()) .find((e) => e.includes('z_c0')) ?.slice('z_c0='.length); return {