From 5f2f79a3dab75fa9b8d95c9df2a5c5f40faaf7ee Mon Sep 17 00:00:00 2001 From: Daniil Oberlev Date: Sat, 31 Aug 2024 22:26:59 +0300 Subject: [PATCH] ADD: -JWT-token --- middleware.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/middleware.ts b/middleware.ts index 7455ff9..0868b8e 100644 --- a/middleware.ts +++ b/middleware.ts @@ -1,9 +1,7 @@ import { jwtVerify } from 'jose' import { NextRequest, NextResponse } from 'next/server' -const SECRET_KEY = new TextEncoder().encode( - process.env.JWT_SECRET || 'default_secret', -) +const SECRET_KEY = new TextEncoder().encode(process.env.JWT_SECRET) const parseCookies = (cookieHeader: string): Record => { return cookieHeader.split('; ').reduce(