Skip to content

Commit

Permalink
add middleware (still working)
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Oct 16, 2024
1 parent 665c981 commit 0af3725
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/middleware.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {NextRequest, NextResponse} from 'next/server';

export function middleware(request: NextRequest) {
if (request.nextUrl.pathname === '/') {
return NextResponse.next({
headers: {
link: '<https://example.com>; rel="alternate"; hreflang="x-default'
}
});
}
}

0 comments on commit 0af3725

Please sign in to comment.