fix(middleware): /manual.html 등 정적 .html/.pdf 파일 인증 면제
Deploy momo-erp / deploy (push) Successful in 51s
Deploy momo-erp / deploy (push) Successful in 51s
증상: https://momotogether.com/manual.html 접속 시 /login 으로 307 리다이렉트. 원인: middleware 가 .html 확장자 정적 파일을 인증 체크 대상으로 분류. 해결: 정적 자산 정규식에 html/htm/pdf/txt 추가. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -35,8 +35,8 @@ export function middleware(request: NextRequest) {
|
||||
return NextResponse.next();
|
||||
}
|
||||
|
||||
// 정적 자산(이미지/폰트 등)은 인증 면제
|
||||
if (/\.(svg|png|jpg|jpeg|gif|webp|ico|woff2?|ttf|otf|css|js|map)$/i.test(pathname)) {
|
||||
// 정적 자산(이미지/폰트/문서 등)은 인증 면제
|
||||
if (/\.(svg|png|jpg|jpeg|gif|webp|ico|woff2?|ttf|otf|css|js|map|html|htm|pdf|txt)$/i.test(pathname)) {
|
||||
return NextResponse.next();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user