Add Content-Length header

This commit is contained in:
Sébastien Chopin 2016-11-25 17:57:59 +01:00
parent 74951a7e40
commit 65de0934f6
1 changed files with 1 additions and 0 deletions

View File

@ -132,6 +132,7 @@ class Nuxt {
res.statusCode = context.nuxt.error.statusCode || 500
}
res.setHeader('Content-Type', 'text/html; charset=utf-8')
res.setHeader('Content-Length', Buffer.byteLength(html))
res.end(html, 'utf8')
})
.catch((err) => {