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) => {
|
||||
writtenHeaders[key.toLowerCase()] = properHeaders[key];
|
||||
});
|
||||
writtenStatusCode = statusCode;
|
||||
res.setHeader("X-SVRJS-Cache", "MISS");
|
||||
}
|
||||
writtenStatusCode = statusCode;
|
||||
res.setHeader("X-SVRJS-Cache", "MISS");
|
||||
if (headers) {
|
||||
originalWriteHead(
|
||||
writtenStatusCode,
|
||||
|
|
Loading…
Reference in a new issue