Unverified Commit a675bde6 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update no duplicate headers case (#70381)

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)
parent c43e3eeb
......@@ -6,7 +6,6 @@ export function middleware(request: NextRequest) {
return NextResponse.next({
headers: {
'Cache-Control': 'max-age=1234',
'Content-Type': 'image/vnd.microsoft.icon',
},
})
}
......
......@@ -9,6 +9,5 @@ describe('no-duplicate-headers-next-config', () => {
const res = await next.fetch('favicon.ico')
expect(res.status).toBe(200)
expect(res.headers.get('cache-control')).toBe('max-age=1234')
expect(res.headers.get('content-type')).toBe('image/vnd.microsoft.icon')
})
})
......@@ -11,10 +11,6 @@ const nextConfig = {
key: 'cache-control',
value: 'max-age=1234',
},
{
key: 'content-type',
value: 'image/vnd.microsoft.icon',
},
],
},
]
......
......@@ -9,6 +9,5 @@ describe('no-duplicate-headers-next-config', () => {
const res = await next.fetch('favicon.ico')
expect(res.status).toBe(200)
expect(res.headers.get('cache-control')).toBe('max-age=1234')
expect(res.headers.get('content-type')).toBe('image/vnd.microsoft.icon')
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment