Skip to content

Commit 048a95c

Browse files
committed
refactor: 미들웨어 수정
1 parent b2afa16 commit 048a95c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/middleware.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ export async function middleware(request: NextRequest) {
3737
return NextResponse.redirect(new URL("/", request.url));
3838
}
3939

40+
if (pathname.startsWith("/informations/write") && !accessToken) {
41+
return NextResponse.redirect(new URL("/auth/signin", request.url));
42+
}
43+
44+
if (pathname.startsWith("/informations/edit") && !accessToken) {
45+
return NextResponse.redirect(new URL("/auth/signin", request.url));
46+
}
47+
4048
if (pathname.startsWith("/gathering/write") && !accessToken) {
4149
return NextResponse.redirect(new URL("/auth/signin", request.url));
4250
}

0 commit comments

Comments
 (0)