From d4c360b69ec027fd72119f5a4c39a7521f6d069c Mon Sep 17 00:00:00 2001 From: hakyoung12 Date: Wed, 16 Oct 2024 13:30:13 +0900 Subject: [PATCH] =?UTF-8?q?[KAN-117]=20remove:=20=EB=AF=B8=EB=93=A4?= =?UTF-8?q?=EC=9B=A8=EC=96=B4=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/middleware.ts | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 src/middleware.ts diff --git a/src/middleware.ts b/src/middleware.ts deleted file mode 100644 index cb0c3332..00000000 --- a/src/middleware.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { NextRequest, NextResponse } from 'next/server'; -import { getCookie } from './app/api/actions/cookie/cookie'; - -export async function middleware(req: NextRequest) { - const token = await getCookie('token'); - if (!token) { - return NextResponse.redirect(new URL('/signin', req.url)); - } - - return NextResponse.next(); -} - -// 미들웨어에 추가할 엔드포인트입니다. -export const config = { - matcher: ['/mypage/:path*'], -};