mirror of
https://github.com/netbirdio/docs.git
synced 2026-10-14 17:49:05 +02:00
redirect static files to a prefixed path
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
|
||||
export function middleware(req) {
|
||||
if (req.nextUrl.href.includes('/docs-static/_next/'))
|
||||
return NextResponse.rewrite(
|
||||
req.nextUrl.href.replace('/docs-static/_next/', '/_next/'),
|
||||
);
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user