Skip to content

fix: support public Worker image assets - #43

Merged
mrgoonie merged 1 commit into
mainfrom
codex/fix-9-worker-assets
Nov 8, 2026
Merged

mrgoonie merged 1 commit into
mainfrom
codex/fix-9-worker-assets

Conversation

@mrgoonie

@mrgoonie mrgoonie commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Problem and change

Workers refuse same-zone image URLs because global fetch can bypass the site's security controls. Hosts can now explicitly provide their own Assets binding and public path prefixes to proxy exact same-origin static images. These paths bypass middleware, so the README requires them to contain public files only. Sibling domains remain blocked.

Asset tickets are bound to the issuing origin and fetch mode, and cannot fall back to the network when configuration changes. Ordinary tickets retain the existing PHP-compatible namespace.

Part of #9; Windows PHP image storage remains tracked by #33.

Validation

  • Independent security review completed; cross-origin ticket, legacy-ticket and configuration-change findings fixed.
  • PHP_BIN=C:/tools/php/php.exe pnpm test: 381 passed, 5 skipped.
  • pnpm typecheck, pnpm build, pnpm test:bundlers passed.
  • Local Wrangler/Workers runtime with actual Assets binding: public PNG 200, out-of-prefix private PNG 403, missing image 502.
  • Surface parity: server API and README updated; widget wrappers unchanged because their image contract is unchanged; PHP unchanged because Assets is Workers-specific; CLI and tracing N/A for this client library.

@mrgoonie
mrgoonie merged commit c357318 into main Nov 8, 2026
3 checks passed
@mrgoonie
mrgoonie deleted the codex/fix-9-worker-assets branch November 8, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant