From d2a4f3dbad7dec2e75af0359df30276d0132326b Mon Sep 17 00:00:00 2001 From: Syco21 Date: Wed, 20 May 2026 19:27:01 +0200 Subject: [PATCH] Log full qBittorrent login response headers --- server/routes/qbittorrent.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/routes/qbittorrent.ts b/server/routes/qbittorrent.ts index ed761d3..9f95e33 100644 --- a/server/routes/qbittorrent.ts +++ b/server/routes/qbittorrent.ts @@ -22,12 +22,11 @@ async function getCookie(): Promise { new URLSearchParams({ username: user, password: pass }), { headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Referer': host, 'Origin': host }, - maxRedirects: 0, validateStatus: s => s < 400, } ) - console.log(`[qbt] login status=${res.status} body=${JSON.stringify(res.data)} cookies=${JSON.stringify(res.headers['set-cookie'])}`) + console.log(`[qbt] status=${res.status} headers=${JSON.stringify(res.headers)} body=${JSON.stringify(res.data)}`) const cookie = (res.headers['set-cookie'] ?? []).find((c: string) => c.startsWith('SID=')) if (!cookie) throw new Error(`qBittorrent login failed (${res.status}): "${String(res.data).trim()}"`)