Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Nov 6, 2024
1 parent efb57a4 commit 1e4f099
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/handler/cache-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,7 @@ class CacheHandler extends DecoratorHandler {
}
}

if (typeof this.#handler.onHeaders === 'function') {
return downstreamOnHeaders()
}

return false
return downstreamOnHeaders()
}

/**
Expand Down Expand Up @@ -330,7 +326,7 @@ function stripNecessaryHeaders (rawHeaders, parsedHeaders, cacheControlDirective
for (let i = 0; i < headerNames.length; i++) {
const header = headerNames[i]

if (headersToRemove.indexOf(header) !== -1) {
if (headersToRemove.includes(header)) {
// We have a at least one header we want to remove
if (!strippedHeaders) {
// This is the first header we want to remove, let's create the object
Expand Down

0 comments on commit 1e4f099

Please sign in to comment.