Minor Changes
-
#15998
b75421fThanks @dario-piotrowicz! - Addassets.base_pathsupport to Workers AssetsServe an asset directory from a public URL prefix without changing its on-disk layout:
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
_headersand_redirectsrules continue to match full public paths. In particular, both the source and destination of an authored200asset rewrite must include the configured public prefix; Asset Worker-generated redirects are prefixed automatically.
Patch Changes
-
#16069
425662bThanks @Pitchfork-and-Torch! - fix: infer Preview/git branch names from unborn repositoriesgetBranchName()previously usedgit rev-parse --abbrev-ref HEAD, which fails (and can leak stderr) before the first commit, and returns the literalHEADon detached checkouts. It now usesgit branch --show-currentwith stderr suppressed so unborn branches resolve and detached checkouts return no inferred name.Preview commit ref, commit message, and the CI repository URL git fallback swallow stderr the same way, so an unborn repository does not print Git fatal errors.
Refs: cloudflare/cf#24
-
Updated dependencies [
f025bbf,b75421f,0ec13b7,2b1a0ca,c492d63,ba52118,946aaa7,48f3c04,5606a74,f8cdcb9,e44cf6b,aa2f9b7,0b51fec]:- @cloudflare/config@0.24.0
- @cloudflare/workers-utils@0.47.0
- miniflare@5.20261006.0-alpha
- @cloudflare/containers-shared@0.21.4
- @cloudflare/cli-shared-helpers@0.2.4
{ "assets": { "directory": "./public", "base_path": "/docs" } }