Parent Directory
|
Revision Log
chore: add trunk
1 | rakinar2 | 575 | 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 |