fix: fix header name casing inconsistencies causing wrong caching behavior
This commit is contained in:
parent
5b5f7bb0e7
commit
3fc7b30ccd
1 changed files with 4 additions and 4 deletions
|
@ -76,10 +76,10 @@ module.exports = function (req, res, logFacilities, config, next) {
|
|||
let maximumCachedResponseSizeExceeded = false;
|
||||
|
||||
res.writeHead = function (statusCode, statusCodeDescription, headers) {
|
||||
writtenHeaders = Object.assign(
|
||||
writtenHeaders,
|
||||
headers ? headers : statusCodeDescription
|
||||
);
|
||||
const properHeaders = headers ? headers : statusCodeDescription;
|
||||
Object.keys(properHeaders).forEach((key) => {
|
||||
writtenHeaders[key.toLowerCase()] = properHeaders[key];
|
||||
});
|
||||
writtenStatusCode = statusCode;
|
||||
res.setHeader("X-SVRJS-Cache", "MISS");
|
||||
if (headers) {
|
||||
|
|
Loading…
Reference in a new issue