fix(ci): remove redundant robots-test diagnostic route and check
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🩺 Smoke Test (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🩺 Smoke Test (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
This commit is contained in:
@@ -9,10 +9,6 @@ import type { NextRequest } from 'next/server';
|
||||
export function middleware(request: NextRequest) {
|
||||
const { pathname } = request.nextUrl;
|
||||
|
||||
// 1. Diagnostic Rewrite
|
||||
if (pathname === '/robots-test') {
|
||||
return NextResponse.rewrite(new URL('/robots.txt', request.url));
|
||||
}
|
||||
|
||||
// 2. Legacy Showcase Asset Mapping
|
||||
// Matches: /wp-content/*, /wp-includes/*, /assets/*, and their relative subpaths
|
||||
@@ -36,7 +32,6 @@ export function middleware(request: NextRequest) {
|
||||
// Optimization: Only run middleware for legacy asset paths to minimize overhead
|
||||
export const config = {
|
||||
matcher: [
|
||||
'/robots-test',
|
||||
'/wp-content/:path*',
|
||||
'/wp-includes/:path*',
|
||||
'/assets/:path*',
|
||||
|
||||
Reference in New Issue
Block a user