From 1e4f099e9f36357accf0a9543b4472f2cca71b03 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Wed, 6 Nov 2024 09:52:36 +0000 Subject: [PATCH] WIP --- lib/handler/cache-handler.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/handler/cache-handler.js b/lib/handler/cache-handler.js index e4b361693ab..b86239c5da3 100644 --- a/lib/handler/cache-handler.js +++ b/lib/handler/cache-handler.js @@ -145,11 +145,7 @@ class CacheHandler extends DecoratorHandler { } } - if (typeof this.#handler.onHeaders === 'function') { - return downstreamOnHeaders() - } - - return false + return downstreamOnHeaders() } /** @@ -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