File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ const REDIRECTS : Record < string , string > = {
2+ '/install.ps1' : 'https://github.com/CodingWithCalvin/dtvem.cli/releases/latest/download/install.ps1' ,
3+ '/install.sh' : 'https://github.com/CodingWithCalvin/dtvem.cli/releases/latest/download/install.sh' ,
4+ } ;
5+
6+ export default {
7+ async fetch ( request : Request , env : { ASSETS : { fetch : typeof fetch } } ) : Promise < Response > {
8+ const url = new URL ( request . url ) ;
9+
10+ // Check for redirects
11+ const redirectTarget = REDIRECTS [ url . pathname ] ;
12+ if ( redirectTarget ) {
13+ return Response . redirect ( redirectTarget , 302 ) ;
14+ }
15+
16+ // Fall through to static assets
17+ return env . ASSETS . fetch ( request ) ;
18+ } ,
19+ } ;
Original file line number Diff line number Diff line change 11name = " dtvem-io"
2+ main = " ./worker.ts"
23compatibility_date = " 2024-12-01"
34
45[assets ]
You can’t perform that action at this time.
0 commit comments