mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
14 lines
364 B
JavaScript
14 lines
364 B
JavaScript
import { NextResponse } from 'next/server'
|
|
|
|
export function proxy(request, context) {
|
|
const url = new URL(request.url)
|
|
url.pathname = `/en-EN${url.pathname}`
|
|
|
|
return NextResponse.rewrite(url)
|
|
}
|
|
|
|
export const config = {
|
|
// Matcher ignoring `/_next/`, `/api/`, static assets, favicon, etc.
|
|
matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'],
|
|
}
|