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
7 lines
226 B
JavaScript
7 lines
226 B
JavaScript
export default function handler(_req, res) {
|
|
res.setHeader('Content-Type', 'image/png')
|
|
res.end(
|
|
`<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="60" height="60"><text x="20" y="30">hi</text></svg>`
|
|
)
|
|
}
|