Skip to content

Commit f5ebf92

Browse files
committed
Updates
1 parent c81269e commit f5ebf92

File tree

1 file changed

+3
-3
lines changed
  • src/content/docs/workers/static-assets

1 file changed

+3
-3
lines changed

src/content/docs/workers/static-assets/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ export default {
8585

8686
By default, if a requested URL matches a file in the static assets directory, that file will be served — without invoking Worker code. If no matching asset is found and a Worker script is present, the request will be processed by the Worker. The Worker can return a response or choose to defer again to static assets by using the [assets binding](/workers/static-assets/binding/) (e.g. `env.ASSETS.fetch(request)`). If no Worker script is present, a `404 Not Found` response is returned.
8787

88-
The default behavior when neither an asset nor a Worker script is found can be changed by setting the [`not_found_handling` option under `assets`](/workers/wrangler/configuration/#assets) in your Wrangler configuration file:
88+
The default behavior for requests which don't match a static asset can be changed by setting the [`not_found_handling` option under `assets`](/workers/wrangler/configuration/#assets) in your Wrangler configuration file:
8989

90-
- `not_found_handling = "single-page-application"`: Sets your application to return `index.html` for unmatched routes. Use this if you have a Single Page Application.
91-
- `not_found_handling = "404-page""`: Sets your application to return `404.html` for unmatched routes.
90+
- [`not_found_handling = "single-page-application"`](/workers/static-assets/routing/single-page-application/): Sets your application to return a `200 OK` response with `index.html` for requests which don't match a static asset. Use this if you have a Single Page Application.
91+
- [`not_found_handling = "404-page"`](/workers/static-assets/routing/static-site-generation/#custom-404-pages): Sets your application to return a `404 Not Found` response with the nearest `404.html` for requests which don't match a static asset.
9292

9393
<WranglerConfig>
9494

0 commit comments

Comments
 (0)