@nxtedition/nxt-undici 6.0.8 → 6.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/interceptor/cache.js +3 -5
- package/package.json +1 -1
package/lib/interceptor/cache.js
CHANGED
|
@@ -70,13 +70,11 @@ class CacheHandler extends DecoratorHandler {
|
|
|
70
70
|
return super.onHeaders(statusCode, headers, resume)
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
for (const key of headers.
|
|
73
|
+
for (const key of headers.vary.split(',').map((key) => key.trim().toLowerCase())) {
|
|
74
74
|
const val = this.#key.headers[key]
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
return super.onHeaders(statusCode, headers, resume)
|
|
75
|
+
if (val != null) {
|
|
76
|
+
vary[key] = this.#key.headers[key]
|
|
78
77
|
}
|
|
79
|
-
vary[key] = val
|
|
80
78
|
}
|
|
81
79
|
}
|
|
82
80
|
|