Files
auto-trade/middleware.ts

34 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-02-03 10:51:22 +09:00
import { type NextRequest } from "next/server";
import { updateSession } from "@/utils/supabase/middleware";
/**
* [Next.js ]
*
* .
* .
*/
export async function middleware(request: NextRequest) {
// 방금 만든 updateSession 함수를 호출하여 쿠키/세션을 관리합니다.
return await updateSession(request);
}
/**
* [ ]
*
* '어떤 경로' , '어떤 경로는 무시할지' .
*/
export const config = {
matcher: [
/*
* (Regex) (exclude) :
* - _next/static ( )
* - _next/image ( API)
* - favicon.ico ( )
* - .svg, .png, .jpg
*
* , html .
*/
"/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)",
],
};