From 6450f780234cd165febc8e724db98e77e759cd36 Mon Sep 17 00:00:00 2001 From: Damien Simonin Feugas Date: Mon, 14 Nov 2022 16:10:50 +0100 Subject: [PATCH] docs(edge-api-routes): fixes example The last example is wrong since next@13 breaking change on cookie handling. --- docs/api-routes/edge-api-routes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-routes/edge-api-routes.md b/docs/api-routes/edge-api-routes.md index 571f19879dab..d05af1488103 100644 --- a/docs/api-routes/edge-api-routes.md +++ b/docs/api-routes/edge-api-routes.md @@ -95,7 +95,7 @@ export const config = { } export default async function handler(req: NextRequest) { - const authorization = req.cookies.get('authorization') + const authorization = req.cookies.get('authorization')?.value return fetch('https://backend-api.com/api/protected', { method: req.method, headers: {