fix: set written status code and X-SVRJS-Cache header when no header is passed to res.writeHead()
This commit is contained in:
parent
ed53ea2061
commit
fc4b89c6bd
1 changed files with 2 additions and 2 deletions
|
@ -81,9 +81,9 @@ module.exports = function (req, res, logFacilities, config, next) {
|
||||||
Object.keys(properHeaders).forEach((key) => {
|
Object.keys(properHeaders).forEach((key) => {
|
||||||
writtenHeaders[key.toLowerCase()] = properHeaders[key];
|
writtenHeaders[key.toLowerCase()] = properHeaders[key];
|
||||||
});
|
});
|
||||||
|
}
|
||||||
writtenStatusCode = statusCode;
|
writtenStatusCode = statusCode;
|
||||||
res.setHeader("X-SVRJS-Cache", "MISS");
|
res.setHeader("X-SVRJS-Cache", "MISS");
|
||||||
}
|
|
||||||
if (headers) {
|
if (headers) {
|
||||||
originalWriteHead(
|
originalWriteHead(
|
||||||
writtenStatusCode,
|
writtenStatusCode,
|
||||||
|
|
Loading…
Reference in a new issue