File tree Expand file tree Collapse file tree 3 files changed +1
-14
lines changed Expand file tree Collapse file tree 3 files changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -3,23 +3,10 @@ export default {
3
3
const r = await env . ASSETS . fetch ( request )
4
4
if ( r . status == 404 ) {
5
5
const url = new URL ( request . url )
6
- const redirectPath = redirect ( url . pathname )
7
- if ( redirectPath ) {
8
- url . pathname = redirectPath
9
- return Response . redirect ( url . toString ( ) , 301 )
10
- }
11
6
url . pathname = '/404.html'
12
7
const r = await env . ASSETS . fetch ( url )
13
8
return new Response ( r . body , { status : 404 } )
14
9
}
15
10
return r
16
11
} ,
17
12
} satisfies ExportedHandler < Env >
18
-
19
- const redirect_lookup : Record < string , string > = {
20
- '/common_tools/' : '/common-tools/' ,
21
- }
22
-
23
- function redirect ( pathname : string ) : string | null {
24
- return redirect_lookup [ pathname ] ?? null
25
- }
File renamed without changes.
Original file line number Diff line number Diff line change 20
20
- models.md
21
21
- dependencies.md
22
22
- tools.md
23
- - common-tools .md
23
+ - common_tools .md
24
24
- results.md
25
25
- message-history.md
26
26
- testing-evals.md
You can’t perform that action at this time.
0 commit comments