mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
* fix: hardcoded protocol in request url * test: covers custom server using https * Apply suggestions from code review * fix test Co-authored-by: JJ Kasper <[email protected]>
12 lines
269 B
JavaScript
12 lines
269 B
JavaScript
import { NextResponse } from 'next/server'
|
|
|
|
export default function middleware(request) {
|
|
const response = NextResponse.next()
|
|
response.headers.append('x-original-url', request.url)
|
|
return response
|
|
}
|
|
|
|
export const config = {
|
|
matcher: '/middleware-augmented',
|
|
}
|