Skip to content

Commit

Permalink
docs(cookies) add secret to @fatsify/cookie example
Browse files Browse the repository at this point in the history
  • Loading branch information
havrydotdev authored Sep 19, 2023
1 parent 423b92b commit e510d4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content/techniques/cookies.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ const app = await NestFactory.create<NestFastifyApplication>(
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:
Expand Down

0 comments on commit e510d4b

Please sign in to comment.