Skip to content

Commit

Permalink
Fix rebased changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
GregBrimble committed Jan 15, 2025
1 parent 7c34b50 commit 17c97c2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
5 changes: 0 additions & 5 deletions .changeset/fuzzy-nails-invent.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/proud-rules-try.md

This file was deleted.

19 changes: 0 additions & 19 deletions packages/pages-shared/asset-server/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,6 @@ function checkIfNoneMatch(
return ifNoneMatch === weakETag || ifNoneMatch === strongETag;
}

function generateETagHeader(assetKey: string) {
// https://support.cloudflare.com/hc/en-us/articles/218505467-Using-ETag-Headers-with-Cloudflare
// We sometimes remove etags unless they are wrapped in quotes
const strongETag = `"${assetKey}"`;
const weakETag = `W/"${assetKey}"`;
return { strongETag, weakETag };
}

function checkIfNoneMatch(
request: Request,
strongETag: string,
weakETag: string
) {
const ifNoneMatch = request.headers.get("if-none-match");

// We sometimes downgrade strong etags to a weak ones, so we need to check for both
return ifNoneMatch === weakETag || ifNoneMatch === strongETag;
}

type ServeAsset<AssetEntry> = (
assetEntry: AssetEntry,
options?: { preserve: boolean }
Expand Down

0 comments on commit 17c97c2

Please sign in to comment.