@harperfast/prerender v0.2.0
@harperfast/prerender v0.2.0
Origin staging passthrough
A new staging option to verify an origin against a staging edge (e.g. the Akamai staging network)
through the plugin, without changing the URL, the Host, or the cache:
'@harperfast/prerender':
staging:
ip: '' # staging edge IP; empty = disabled
header: x-harper-staging # request header whose presence toggles staging passthrough- When
staging.ipis set, a cache-miss origin fetch that carries thestaging.headerrequest
header is connected to that IP instead of the public origin. Only the TCP connect address is pinned
(via an undiciAgentconnect.lookup) — theHostheader, TLS SNI, and certificate validation stay
the real origin host, so the staging edge serves the right property and a valid cert. - The header is a toggle, not a target — the address is always the configured
staging.ip, never a
value from the request, so a request can't repoint the fetch at an arbitrary host. - Cache hits are unaffected — the header isn't part of the cache key, so cached pages are served as-is;
only the live origin fetch on a miss is redirected. - With the
debugHeaderpresent, a staging-served response is taggedx-harper-origin: staging. - Off by default; production is unaffected unless
staging.ipis configured.
Also
- Fixed a stray
NULbyte inupstream.js(a memoization-key separator) that made git treat the file as
binary; added.gitattributesso source files always diff as text.
No breaking changes. 63/63 tests pass.
Tarball: harperfast-prerender-0.2.0.tgz (this release also bundles harperfast-prerender-browser-1.3.0.tgz, unchanged from v1.3.0).