feat: refine admin workflows and deployment packaging

This commit is contained in:
Codex
2026-05-11 14:19:29 +08:00
parent 4e226e7eda
commit 8529276a6f
86 changed files with 3240 additions and 598 deletions
+6
View File
@@ -28,6 +28,11 @@ function shouldUseSimplifiedChinese(request: NextRequest) {
export default function middleware(request: NextRequest) {
const { pathname, search } = request.nextUrl
if (pathname === '/admin/forgot' || pathname.startsWith('/admin/forgot/')) {
return new NextResponse(null, { status: 404 })
}
const hasLocalePrefix = locales.some(
(locale) => pathname === `/${locale}` || pathname.startsWith(`/${locale}/`),
)
@@ -45,6 +50,7 @@ export default function middleware(request: NextRequest) {
export const config = {
matcher: [
'/admin/forgot/:path*',
// Skip all internal paths (_next, _vercel, api, admin, payload assets, static files)
'/((?!api|admin|_next|_vercel|favicon\\.ico|robots\\.txt|sitemap.*|Products|Product|.*\\..*).*)',
],