Skip to content

Commit

Permalink
test push 배포
Browse files Browse the repository at this point in the history
  • Loading branch information
ftery0 committed Jul 12, 2024
1 parent 2b575bf commit b247aaf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export function middleware(request: NextRequest) {
) {
return NextResponse.redirect(new URL("/login", request.url));
}

// 공용 경로에 접근하려고 하지만 토큰이 있는 경우
if (token && publicRoutes.some((route) => currentPath.startsWith(route))) {
return NextResponse.redirect(new URL("/", request.url));
Expand Down

0 comments on commit b247aaf

Please sign in to comment.