From 423b92b7755ad77678252f15e6919816ba4c52bb Mon Sep 17 00:00:00 2001 From: Ivan Gavrylenko Date: Tue, 19 Sep 2023 14:23:13 +0300 Subject: [PATCH] Fix @fastify/cookies example replace () => fastifyCookie with fastifyCookie, because first example doesn't seem to work --- content/techniques/cookies.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/techniques/cookies.md b/content/techniques/cookies.md index abed4faef8..8a1d9f2c38 100644 --- a/content/techniques/cookies.md +++ b/content/techniques/cookies.md @@ -71,9 +71,7 @@ const app = await NestFactory.create( AppModule, new FastifyAdapter(), ); -await app.register(() => fastifyCookie, { - secret: 'my-secret', // for cookies signature -}); +await app.register(fastifyCookie); ``` With this in place, you can now read cookies from within the route handlers, as follows: