references/static-assets/configuration.md
Static Assets Configuration
Inspect the build script, output directory, Wrangler configuration, and any framework-generated deployment configuration first. Configure the files actually produced by the build, and identify which paths need Worker logic.
| Task | Documentation | |------|---------------| | Set the asset directory and exclude non-public files | Directory and ignoring assets | | Make assets available to Worker code | Asset binding configuration | | Select paths that must run Worker logic before asset serving | Worker-first configuration | | Configure SPA fallback and navigation behavior | SPA configuration | | Configure generated HTML and missing-page responses | SSG configuration | | Choose canonical HTML URLs and trailing slash handling | HTML handling modes | | Configure assets produced by the Cloudflare Vite plugin | Vite asset configuration | | Configure static response headers or redirects | Headers and redirects |
For Vite projects, inspect generated output before overriding asset paths. For protected routes, ensure that the selected routing configuration reaches the authorization logic before returning an asset. Use patterns.md to decide routing intent and gotchas.md to verify it.