From 33e5d3447e2ab407622a7aa082af35adb80398ae Mon Sep 17 00:00:00 2001 From: Juanma Hidalgo Date: Thu, 7 Sep 2023 14:01:03 +0200 Subject: [PATCH] feat: increase signature expiration time (#704) * feat: increase signature expiration time * chore: decrease the signature to 5 mins --- src/middleware/authentication.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/middleware/authentication.ts b/src/middleware/authentication.ts index 2a61844c..35094b7d 100644 --- a/src/middleware/authentication.ts +++ b/src/middleware/authentication.ts @@ -77,6 +77,7 @@ export async function decodeAuthChain(req: Request): Promise { try { await verify(req.method, `/${API_VERSION}${req.path}`, req.headers, { fetcher: peerAPI.signatureFetcher, + expiration: 1000 * 60 * 5, // 5 minutes }) } catch (error) { errorMessage = isErrorWithMessage(error) ? error.message : 'Unknown'