From 25514b58ab2fc814a0dfe449db55783b65c9f9ae Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Fri, 1 Sep 2023 18:41:48 +0700 Subject: [PATCH] fix: trim cookie string before extracting values (#3652) Signed-off-by: Alexander Onnikov --- server/front/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/front/src/index.ts b/server/front/src/index.ts index 12ba666136..3f90343ade 100644 --- a/server/front/src/index.ts +++ b/server/front/src/index.ts @@ -230,7 +230,7 @@ export function start ( const filesHandler = async (req: any, res: Response): Promise => { try { console.log(req.headers) - const cookies = ((req?.headers?.cookie as string) ?? '').split(';').map((it) => it.split('=')) + const cookies = ((req?.headers?.cookie as string) ?? '').split(';').map((it) => it.trim().split('=')) const token = cookies.find((it) => it[0] === 'presentation-metadata-Token')?.[1] const payload =