Packages

miniflare

4.20260730.0 · 30 Jul 2026MIT57.5M / weekRepositoryHomepagenpmAtom feed

Your version

4.20260114.0

15 Jan 2026Where it was published

4.20260730.0 is the newest release of 4.x.

In short

1 new1 fixed1 internal

Release note

Minor Changes

  • Add MF-Original-Hostname header when using the upstream option

    When using the upstream option in Miniflare, the Host header is rewritten to match the upstream server, which means the original hostname is lost. This change adds a new MF-Original-Hostname header 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, stoppable

    • kv-asset-handler: mime

    • vite-plugin-cloudflare: @remix-run/node-fetch-server, defu, get-port, picocolors, tinyglobby

    • vitest-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.