github cloudflare/workers-sdk @cloudflare/workers-utils@0.47.0

Minor Changes

  • #15998 b75421f Thanks @dario-piotrowicz! - Add assets.base_path support to Workers Assets

    Serve an asset directory from a public URL prefix without changing its on-disk layout:

    {
      "assets": {
        "directory": "./public",
        "base_path": "/docs"
      }
    }

    Wrangler, preview, Miniflare, and generated build configuration preserve the explicitly selected value, while the Asset Worker normalizes it and strips the prefix only for asset lookup. Requests passed to a user Worker, request-facing headers, and redirects retain the public path. Relative pathname inputs are interpreted as root-relative prefixes, URL-shaped values are rejected, and omitting the option preserves existing root-path behavior.

    Authored _headers and _redirects rules continue to match full public paths. In particular, both the source and destination of an authored 200 asset rewrite must include the configured public prefix; Asset Worker-generated redirects are prefixed automatically.

Patch Changes

  • #15534 2b1a0ca Thanks @vahidshaik1901! - Improve guidance for conflicting Wrangler configuration files

    When user and generated deploy configurations are found under different base paths, Wrangler now identifies the expected deploy configuration location, suggests how to resolve the conflict, and links to the relevant documentation.

  • #16030 aa2f9b7 Thanks @edmundhung! - Extend startTunnel() to support email-protected Quick Tunnels

    Pass a list of email addresses or domain patterns through TunnelOptions.allowedMail to restrict access to a Quick Tunnel.

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.