From e510d4b3ac18c069a912f67ac2c5f97bc2534a33 Mon Sep 17 00:00:00 2001 From: Ivan Gavrylenko Date: Tue, 19 Sep 2023 14:31:26 +0300 Subject: [PATCH] docs(cookies) add secret to @fatsify/cookie example --- content/techniques/cookies.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/techniques/cookies.md b/content/techniques/cookies.md index 8a1d9f2c38..8d203c6e5a 100644 --- a/content/techniques/cookies.md +++ b/content/techniques/cookies.md @@ -71,7 +71,9 @@ const app = await NestFactory.create( AppModule, new FastifyAdapter(), ); -await app.register(fastifyCookie); +await app.register(fastifyCookie, { + secret: 'my-secret', // for cookies signature +}); ``` With this in place, you can now read cookies from within the route handlers, as follows: