mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 08:48:01 +00:00
fix: trim cookie string before extracting values (#3652)
Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
parent
c67395fcce
commit
25514b58ab
@ -230,7 +230,7 @@ export function start (
|
|||||||
const filesHandler = async (req: any, res: Response): Promise<void> => {
|
const filesHandler = async (req: any, res: Response): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
console.log(req.headers)
|
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 token = cookies.find((it) => it[0] === 'presentation-metadata-Token')?.[1]
|
||||||
const payload =
|
const payload =
|
||||||
|
Loading…
Reference in New Issue
Block a user