Buckets:
| import { NextResponse } from 'next/server' | |
| export async function middleware(request) { | |
| const url = request.nextUrl | |
| if ( | |
| request.method === 'HEAD' && | |
| url.basePath === '/root' && | |
| url.pathname === '/redirect-me-to-about' | |
| ) { | |
| url.pathname = '/about' | |
| return NextResponse.redirect(url) | |
| } | |
| if (url.pathname === '/redirect-with-basepath' && !url.basePath) { | |
| url.basePath = '/root' | |
| return NextResponse.redirect(url) | |
| } | |
| if (url.pathname === '/redirect-with-basepath') { | |
| url.pathname = '/about' | |
| return NextResponse.rewrite(url) | |
| } | |
| } | |
Xet Storage Details
- Size:
- 575 Bytes
- Xet hash:
- dbdbb3b0bceb7d2fea2e769a5c2a85be0b37d541168f6097a753178b12e75a2f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.