chore: shift showcase asset rewrites to next.config.mjs for standalone stability
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🏗️ Build (push) Successful in 10m54s
Build & Deploy / 🚀 Deploy (push) Successful in 23s
Build & Deploy / 🩺 Smoke Test (push) Failing after 4s
Build & Deploy / 🔔 Notify (push) Successful in 2s
Nightly QA / 🔗 Links & Deps (push) Successful in 3m56s
Nightly QA / 🎭 Lighthouse (push) Successful in 4m22s
Nightly QA / 🔍 Static Analysis (push) Successful in 4m40s
Nightly QA / 📝 E2E (push) Successful in 5m5s
Nightly QA / 🔔 Notify (push) Has been skipped
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🏗️ Build (push) Successful in 10m54s
Build & Deploy / 🚀 Deploy (push) Successful in 23s
Build & Deploy / 🩺 Smoke Test (push) Failing after 4s
Build & Deploy / 🔔 Notify (push) Successful in 2s
Nightly QA / 🔗 Links & Deps (push) Successful in 3m56s
Nightly QA / 🎭 Lighthouse (push) Successful in 4m22s
Nightly QA / 🔍 Static Analysis (push) Successful in 4m40s
Nightly QA / 📝 E2E (push) Successful in 5m5s
Nightly QA / 🔔 Notify (push) Has been skipped
This commit is contained in:
@@ -18,13 +18,6 @@ export function middleware(request: NextRequest) {
|
||||
// Normalize pathname to ensure we're matching correctly
|
||||
const path = pathname;
|
||||
|
||||
// Map Pattern 1: Global assets (directly under root)
|
||||
// These are often mirrored by wget/discovery engines into a domain-named subfolder
|
||||
if (path.startsWith('/wp-content/') || path.startsWith('/wp-includes/') || path.startsWith('/assets/')) {
|
||||
// Brute force: Re-route to the known KLZ showcase directory
|
||||
return NextResponse.rewrite(new URL(`/showcase/klz-cables.com${path}`, request.url));
|
||||
}
|
||||
|
||||
// Map Pattern 2: Showcase-prefixed assets (used for relative links within the showcase)
|
||||
const showcaseMatch = path.match(/^\/(?:case-studies|work|blog)\/([^\/]+)\/(.*)/);
|
||||
if (showcaseMatch) {
|
||||
|
||||
Reference in New Issue
Block a user