mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This header isn't always able to be overridden so we shouldn't be asserting it specifically in our tests. x-ref: [slack thread](https://vercel.slack.com/archives/C04KC8A53T7/p1727138501597279?thread_ts=1727137032.335159&cid=C04KC8A53T7)
13 lines
306 B
TypeScript
13 lines
306 B
TypeScript
import { NextResponse } from 'next/server'
|
|
import type { NextRequest } from 'next/server'
|
|
|
|
export function middleware(request: NextRequest) {
|
|
if (request.nextUrl.pathname === '/favicon.ico') {
|
|
return NextResponse.next({
|
|
headers: {
|
|
'Cache-Control': 'max-age=1234',
|
|
},
|
|
})
|
|
}
|
|
}
|