Files
auto-trade/proxy.ts

34 lines
1.2 KiB
TypeScript
Raw Permalink Normal View History

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