set content-type for appended code bodies

This commit is contained in:
Stewart Allen 2025-11-13 09:48:45 -05:00
commit b046ae2fa8
2 changed files with 1 additions and 9 deletions

1
app.js
View file

@ -624,6 +624,7 @@ function rewriteHtmlVersion(req, res, next) {
}
body += data;
res.setHeader('Content-Length', Buffer.byteLength(body));
res.setHeader('Content-Type', "application/javascript; charset=utf-8");
real_write.call(res, body);
real_end.call(res);
};