From 6b2ab9081f7cd6436ff4134e36f6b9196e5aa3c1 Mon Sep 17 00:00:00 2001 From: liudongqi Date: Wed, 4 Sep 2024 14:17:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/index.js b/routes/index.js index fa32358..ac74704 100644 --- a/routes/index.js +++ b/routes/index.js @@ -43,8 +43,8 @@ router.post('/rsCookie', async (req, res) => { let cookies = await handle(url, Buffer.from(htmlStr, 'base64').toString('utf-8'), jsText, - cookie != null ? Buffer.from(cookie, 'base64').toString('utf-8') : null, - userAgent != null ? Buffer.from(userAgent, 'base64').toString('utf-8') : null) + cookie != null && cookie !== "" ? Buffer.from(cookie, 'base64').toString('utf-8') : null, + userAgent != null && userAgent !== "" ? Buffer.from(userAgent, 'base64').toString('utf-8') : null) res.status(200).send(cookies); } catch (e) { console.error(e)