mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
fix(nitro): set content-type header before html 404 (#2301)
This commit is contained in:
parent
1c88580c8c
commit
70044d139b
@ -58,5 +58,6 @@ export function handleError (error, req: IncomingMessage, res: ServerResponse) {
|
|||||||
// HTML response
|
// HTML response
|
||||||
const errorTemplate = is404 ? error404 : (isDev ? errorDev : error500)
|
const errorTemplate = is404 ? error404 : (isDev ? errorDev : error500)
|
||||||
const html = errorTemplate(errorObject)
|
const html = errorTemplate(errorObject)
|
||||||
|
res.setHeader('Content-Type', 'text/html;charset=UTF-8')
|
||||||
res.end(html)
|
res.end(html)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user