Skip to content

@harperfast/prerender v0.3.1

Choose a tag to compare

@harper-joseph harper-joseph released this 02 Jul 23:23
b49fb69

Fixes Akamai "Serve Alternate Response" ERR_SWAPFAIL_MISS|badxform on the cache-miss proxy path, where the origin sits behind a CDN.

Changes

  • fix: on a cache miss, relay only an allowlist of genuine origin-response headers instead of forwarding everything. Drops the CDN's own control headers (akamai-grn, x-akamai-*, x-cache*, via, server-timing, …) that were doubled by the serving edge and broke its outgoing transform. (#5)
  • fix: request gzip (not br) from the origin, so the relayed body is transform-safe for the edge (Akamai can't apply its Serve-Alternate transform to a brotli-encoded alternate response). (#5)
  • hardening: sanitizeOriginResponseHeaders guards null input and matches the allowlist case-insensitively. (#5)

Consuming

"@harperfast/prerender": "https://github.com/HarperFast/prerender-plugin/releases/download/prerender-v0.3.1/harperfast-prerender-0.3.1.tgz"