From 968ae94b8a1f3f8ed53cb1e6dbab1c1c6704329f Mon Sep 17 00:00:00 2001 From: "Sixia \"Leask\" Huang" Date: Sun, 6 Apr 2025 18:00:42 -0400 Subject: [PATCH] Update Readme.md (#231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Providing `nul` as `sameSite` will lead to errors. Zod requires sameSite to be a string, so the description in the documentation was inaccurate and has been corrected. ``` ZodError: [ { "code": "invalid_type", "expected": "string", "received": "null", "path": [ "sameSite" ], "message": "Expected string, received null" } ] ``` ## Checklist - [✅] I have ensured my pull request is not behind the main or master branch of the original repository. - [✅] I have rebased all commits where necessary so that reviewing this pull request can be done without having to merge it first. - [✅] I have written a commit message that passes commitlint linting. - [✅] I have ensured that my code changes pass linting tests. - [✅] I have ensured that my code changes pass unit tests. - [✅] I have described my pull request and the reasons for code changes along with context if necessary. --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 34ee099..61c14ac 100644 --- a/Readme.md +++ b/Readme.md @@ -58,7 +58,7 @@ const CONFIG = { rolling: false, /** (boolean) Force a session identifier cookie to be set on every response. The expiration is reset to the original maxAge, resetting the expiration countdown. (default is false) */ renew: false, /** (boolean) renew session when session is nearly expired, so we can always keep user logged in. (default is false)*/ secure: true, /** (boolean) secure cookie*/ - sameSite: null, /** (string) session cookie sameSite options (default null, don't set it) */ + sameSite: null, /** (string) session cookie sameSite options (default null, do not provide this key if you are not restricting sameSite) */ }; app.use(session(CONFIG, app));