diff --git a/middleware.ts b/middleware.ts index abe7327..4bcdb32 100644 --- a/middleware.ts +++ b/middleware.ts @@ -6,11 +6,21 @@ import type { NextRequest } from "next/server"; export default auth(async (req) => { + + // 경로 추출 + const { pathname } = req.nextUrl; + + // 로컬 접속 확인 (특정 경로만 우회) + const isLocal = req.headers.get('host')?.includes('localhost') || + req.headers.get('host')?.includes('127.0.0.1'); + + if (isLocal && pathname.startsWith("/api/contents")) { + return NextResponse.next(); + } + // 세션 가져오기 const session = req.auth; - const { pathname } = req.nextUrl; - if (pathname.startsWith("/admin")) { const email = session?.user?.email; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index ecba885..836969e 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -90,6 +90,14 @@ model noticeBoard{ } +// 스키마 파싱 결과 로그 +model SchemaParseLog { + id String @id @default(uuid()) + parseType String + loggedAt DateTime @default(now()) + comment String @db.LongText +} + /* npx prisma migrate dev --name @@ -102,3 +110,4 @@ model noticeBoard{ */ +