miniflare
4.20260730.0 · 30 Jul 2026MIT57.5M / weekRepositoryHomepagenpmAtom feed
4.20260730.0 is the newest release of 4.x.
In short
1 new1 fixed1 internal
Release note
Minor Changes
Add
MF-Original-Hostnameheader when using theupstreamoptionWhen using the
upstreamoption in Miniflare, theHostheader is rewritten to match the upstream server, which means the original hostname is lost. This change adds a newMF-Original-Hostnameheader that preserves the original hostname from the incoming request.This allows Workers to access the original hostname when proxying requests through an upstream server:
export default { async fetch(request) { const originalHostname = request.headers.get("MF-Original-Hostname"); // originalHostname contains the hostname before it was rewritten }, };
Patch Changes
Bundle more third-party dependencies to reduce supply chain risk
Previously, several small utility packages were listed as runtime dependencies and
installed separately. These are now bundled directly into the published packages,
reducing the number of external dependencies users need to trust.Bundled dependencies:
miniflare:
acorn,acorn-walk,exit-hook,glob-to-regexp,stoppablekv-asset-handler:
mimevite-plugin-cloudflare:
@remix-run/node-fetch-server,defu,get-port,picocolors,tinyglobbyvitest-pool-workers:
birpc,devalue,get-port,semver
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.