Skip to content

Commit c3b9c4a

Browse files
authored
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 nextauthjs#8788
1 parent 262db25 commit c3b9c4a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/core/src/lib/utils/cookie.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ import type {
2424
// )
2525

2626
const ALLOWED_COOKIE_SIZE = 4096
27-
// Based on commented out section above
28-
const ESTIMATED_EMPTY_COOKIE_SIZE = 160
27+
const ESTIMATED_EMPTY_COOKIE_SIZE = 512
2928
const CHUNK_SIZE = ALLOWED_COOKIE_SIZE - ESTIMATED_EMPTY_COOKIE_SIZE
3029

3130
// REVIEW: Is there any way to defer two types of strings?

0 commit comments

Comments
 (0)