Content-Type will now be properly set to text/html for all React-served HTML outputs

pull/52/head
Pascal Mathis 9 years ago
parent ee068e5f2f
commit 8b47fe5e23

@ -20,6 +20,7 @@ module.exports = function (req, res) {
var html = React.renderToString(<Handler data={alt.takeSnapshot()} />)
alt.flush()
res.setHeader('Content-Type', 'text/html');
if (isNotFound(state)) res.status(404)
res.write('<!DOCTYPE html>\n')
res.end(html)

Loading…
Cancel
Save