Skip to content

Commit

Permalink
docs: fix middleware docs cookie example (#42816)
Browse files Browse the repository at this point in the history
fixes #42815

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
  • Loading branch information
reyrodrigez committed Nov 12, 2022
1 parent b180bec commit c10ac68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/advanced-features/middleware.md
Expand Up @@ -165,7 +165,7 @@ export function middleware(request: NextRequest) {
const cookie = request.cookies.get('nextjs')?.value
console.log(cookie) // => 'fast'
const allCookies = request.cookies.getAll()
console.log(allCookies) // => [{ name: 'vercel', value: 'fast' }]
console.log(allCookies) // => [{ name: 'nextjs', value: 'fast' }]

request.cookies.has('nextjs') // => true
request.cookies.delete('nextjs')
Expand Down

0 comments on commit c10ac68

Please sign in to comment.