From 8c0b7cdc1c237dee2582c8a0d362ba96c53ae0fb Mon Sep 17 00:00:00 2001 From: guitavano Date: Thu, 19 Sep 2024 16:29:07 -0300 Subject: [PATCH] change cookie to 5 days --- blocks/matcher.ts | 2 +- runtime/middleware.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/matcher.ts b/blocks/matcher.ts index 85fc141f..29996f7c 100644 --- a/blocks/matcher.ts +++ b/blocks/matcher.ts @@ -160,7 +160,7 @@ const matcherBlock: Block< result ??= isMatchFromCookie ?? matcherFunc(ctx); if (result !== isMatchFromCookie) { const date = new Date(); - date.setTime(date.getTime() + (30 * 24 * 60 * 60 * 1000)); // 1 month + date.setTime(date.getTime() + (5 * 24 * 60 * 60 * 1000)); // 5 days setCookie(respHeaders, { name: cookieName, value: cookieValue.build(uniqueId, result), diff --git a/runtime/middleware.ts b/runtime/middleware.ts index 4b8fa35c..0b9adf31 100644 --- a/runtime/middleware.ts +++ b/runtime/middleware.ts @@ -421,7 +421,7 @@ export const middlewareFor = ( if (hasFlags && cookieSegment !== value) { const date = new Date(); - date.setTime(date.getTime() + (30 * 24 * 60 * 60 * 1000)); // 1 month + date.setTime(date.getTime() + (5 * 24 * 60 * 60 * 1000)); // 5 days setCookie(newHeaders, { name: DECO_SEGMENT, value,