/[sudobot]/branches/8.x/docs/middleware.ts
ViewVC logotype

Annotation of /branches/8.x/docs/middleware.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 577 - (hide annotations)
Mon Jul 29 18:52:37 2024 UTC (8 months ago) by rakinar2
File MIME type: application/typescript
File size: 347 byte(s)
chore: add old version archive branches (2.x to 9.x-dev)
1 rakinar2 577 import { NextRequest, NextResponse } from "next/server";
2    
3     export function middleware(request: NextRequest) {
4     const requestHeaders = new Headers(request.headers);
5    
6     requestHeaders.set("x-invoke-url", new URL(request.url).pathname);
7    
8     return NextResponse.next({
9     request: {
10     headers: requestHeaders,
11     },
12     });
13     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26