Skip to content

Commit dfe82a0

Browse files
committed
Issues/18824: Fix documentation around auto-trailing-slash
- Retains consistency around responses in the routing tables - Fixes a missed trailing slash a the response for auto-trailing-slash
1 parent 5fc15f1 commit dfe82a0

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

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

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ Based on the incoming requests, the following assets would be served:
141141
| /folder | 307 to /folder/ | - |
142142
| /folder.html | 307 to /folder/ | - |
143143
| /folder/ | 200 | /folder/index.html |
144-
| /folder/index | 307 /folder/ | - |
145-
| /folder/index.html | 307 /folder/ | - |
144+
| /folder/index | 307 to /folder/ | - |
145+
| /folder/index.html | 307 to /folder/ | - |
146146

147147
#### 2. `not_found_handling`
148148

@@ -185,18 +185,18 @@ Take the following directory structure:
185185

186186
Based on the incoming requests, the following assets would be served:
187187

188-
| Incoming Request | Response | Asset Served |
189-
| ------------------ | -------------- | ------------------ |
190-
| /file | 200 | /file.html |
191-
| /file.html | 307 to /file | - |
192-
| /file/ | 307 to /file | - |
193-
| /file/index | 307 to /file | - |
194-
| /file/index.html | 307 to /file | - |
195-
| /folder | 307 to /folder | - |
196-
| /folder.html | 307 to /folder | - |
197-
| /folder/ | 200 | /folder/index.html |
198-
| /folder/index | 307 /folder | - |
199-
| /folder/index.html | 307 /folder | - |
188+
| Incoming Request | Response | Asset Served |
189+
| ------------------ | --------------- | ------------------ |
190+
| /file | 200 | /file.html |
191+
| /file.html | 307 to /file | - |
192+
| /file/ | 307 to /file | - |
193+
| /file/index | 307 to /file | - |
194+
| /file/index.html | 307 to /file | - |
195+
| /folder | 307 to /folder/ | - |
196+
| /folder.html | 307 to /folder | - |
197+
| /folder/ | 200 | /folder/index.html |
198+
| /folder/index | 307 to /folder | - |
199+
| /folder/index.html | 307 to /folder | - |
200200

201201
**`html_handling: "force-trailing-slash"`**
202202

@@ -212,8 +212,8 @@ Based on the incoming requests, the following assets would be served:
212212
| /folder | 307 to /folder/ | - |
213213
| /folder.html | 307 to /folder/ | - |
214214
| /folder/ | 200 | /folder/index.html |
215-
| /folder/index | 307 /folder/ | - |
216-
| /folder/index.html | 307 /folder/ | - |
215+
| /folder/index | 307 to /folder/ | - |
216+
| /folder/index.html | 307 to /folder/ | - |
217217

218218
**`html_handling: "drop-trailing-slash"`**
219219

@@ -229,8 +229,8 @@ Based on the incoming requests, the following assets would be served:
229229
| /folder | 200 | /folder/index.html |
230230
| /folder.html | 307 to /folder | - |
231231
| /folder/ | 307 to /folder | - |
232-
| /folder/index | 307 /folder | - |
233-
| /folder/index.html | 307 /folder | - |
232+
| /folder/index | 307 to /folder | - |
233+
| /folder/index.html | 307 to /folder | - |
234234

235235
**`html_handling: "none"`**
236236

@@ -322,3 +322,4 @@ In this example, requests to `example.com/blog/` will serve the `index.html` fil
322322

323323
If you have a file outside the configured path, it will not be served. For example, if you have a `home.html` file in the root of your asset directory, it will not be served when requesting `example.com/blog/home`.
324324
However, if needed, these files can still be manually fetched over [the binding](/workers/static-assets/binding/#binding).
325+
```

0 commit comments

Comments
 (0)