refactor: rename middleware to proxy for Next 16
Next 16 deprecates the middleware file convention; a leftover middleware.js is silently ignored, which would break the x-pathname header that canonical URL generation depends on. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { NextResponse } from 'next/server';
|
import { NextResponse } from 'next/server';
|
||||||
|
|
||||||
export function middleware(request) {
|
export function proxy(request) {
|
||||||
const response = NextResponse.next();
|
const response = NextResponse.next();
|
||||||
|
|
||||||
// Add pathname to headers so we can access it in getCanonicalUrl
|
// Add pathname to headers so we can access it in getCanonicalUrl
|
||||||
Reference in New Issue
Block a user