diff --git a/docs/02-app/01-building-your-application/01-routing/14-middleware.mdx b/docs/02-app/01-building-your-application/01-routing/14-middleware.mdx index e2388fec2d5db..12a5f8ddb756c 100644 --- a/docs/02-app/01-building-your-application/01-routing/14-middleware.mdx +++ b/docs/02-app/01-building-your-application/01-routing/14-middleware.mdx @@ -309,7 +309,7 @@ export function middleware(request: NextRequest) { const requestHeaders = new Headers(request.headers) requestHeaders.set('x-hello-from-middleware1', 'hello') - // You can also set request headers in NextResponse.rewrite + // You can also set request headers in NextResponse.next const response = NextResponse.next({ request: { // New request headers @@ -331,7 +331,7 @@ export function middleware(request) { const requestHeaders = new Headers(request.headers) requestHeaders.set('x-hello-from-middleware1', 'hello') - // You can also set request headers in NextResponse.rewrite + // You can also set request headers in NextResponse.next const response = NextResponse.next({ request: { // New request headers