@cloudflare/pages-shared 0.0.7 → 0.0.8

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.
@@ -398,6 +398,9 @@ export async function generateHandler<
398
398
  const setMap = new Set();
399
399
  // Apply every matched rule in order
400
400
  matches.forEach(({ set = {}, unset = [] }) => {
401
+ unset.forEach((key) => {
402
+ headers.delete(key);
403
+ });
401
404
  Object.keys(set).forEach((key) => {
402
405
  if (setMap.has(key.toLowerCase())) {
403
406
  headers.append(key, set[key]);
@@ -406,9 +409,6 @@ export async function generateHandler<
406
409
  setMap.add(key.toLowerCase());
407
410
  }
408
411
  });
409
- unset.forEach((key) => {
410
- headers.delete(key);
411
- });
412
412
  });
413
413
 
414
414
  // https://fetch.spec.whatwg.org/#null-body-status
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/pages-shared",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "files": [
5
5
  "tsconfig.json",
6
6
  "asset-server/**/*",