Skip to content

Commit

Permalink
fix(nitro): set content-type header before html 404 (#2301)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Dec 6, 2021
1 parent d32d40d commit 68ab584
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/runtime/server/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ export function handleError (error, req: IncomingMessage, res: ServerResponse) {
// HTML response
const errorTemplate = is404 ? error404 : (isDev ? errorDev : error500)
const html = errorTemplate(errorObject)
res.setHeader('Content-Type', 'text/html;charset=UTF-8')
res.end(html)
}

0 comments on commit 68ab584

Please sign in to comment.