From c3b9c4afba5cb4dea104c9b6020fffa523863ea6 Mon Sep 17 00:00:00 2001 From: Lex Cao Date: Tue, 29 Apr 2025 11:48:37 +0800 Subject: [PATCH] feat(cookie): decrease CHUNK_SIZE of cookie There is no better way to modify the CHUNK_SIZE constant value. I am trying to decrease it directly. Please check if it is acceptable. fixes #8788 --- packages/core/src/lib/utils/cookie.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/src/lib/utils/cookie.ts b/packages/core/src/lib/utils/cookie.ts index 7932b37a09..a838f8b0b3 100644 --- a/packages/core/src/lib/utils/cookie.ts +++ b/packages/core/src/lib/utils/cookie.ts @@ -24,8 +24,7 @@ import type { // ) const ALLOWED_COOKIE_SIZE = 4096 -// Based on commented out section above -const ESTIMATED_EMPTY_COOKIE_SIZE = 160 +const ESTIMATED_EMPTY_COOKIE_SIZE = 512 const CHUNK_SIZE = ALLOWED_COOKIE_SIZE - ESTIMATED_EMPTY_COOKIE_SIZE // REVIEW: Is there any way to defer two types of strings?