Skip to content

Commit d536211

Browse files
committed
Add headers and redirects section to Static Assets
1 parent a7cf64e commit d536211

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/content/docs/workers/vite-plugin/reference/static-assets.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ assets = { not_found_handling = "single-page-application" }
3232

3333
</WranglerConfig>
3434

35-
{/* Add docs for _headers and _redirects */}
35+
## Headers and redirects
36+
37+
Custom [headers](/workers/static-assets/headers/) and [redirects](/workers/static-assets/redirects/) are supported at build, preview and deploy time by adding `_headers` and `_redirects` files to your [`public` directory](https://vite.dev/guide/assets#the-public-directory).
38+
The paths in these files should reflect the structure of your client build output.
39+
For example, generated assets are typically located in an [assets subdirectory](https://vite.dev/config/build-options#build-assetsdir).
40+
41+
<br />
3642

3743
:::note
3844
The Cloudflare Vite plugin does not support [run_worker_first](/workers/static-assets/binding/#run_worker_first).

0 commit comments

Comments
 (0)