mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
The tests added in https://github.com/vercel/next.js/pull/46219 were never correctly testing the headers because `detectContentType()` is called first and only when we can't detect the type from the response body do we fallback to the `Content-Type` header. I also refactored some of the tests because the `ctx: any` type was causing some tests to not run when testing different configuration options. Closes NEXT-3321
5 lines
172 B
JavaScript
5 lines
172 B
JavaScript
export default function handler(_req, res) {
|
|
res.setHeader('Content-Type', 'application/svg+xml')
|
|
res.end('body is not svg to force fallback to Content-Type header')
|
|
}
|