File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -11,22 +11,24 @@ export function middleware(request: NextRequest) {
1111 const isPowershell = userAgent . toLowerCase ( ) . includes ( 'powershell' ) ;
1212
1313 if ( isCurl || isPowershell ) {
14- let scriptContent = '' ;
15-
1614 if ( isPowershell ) {
1715 // Windows PowerShell command
18- scriptContent = `powershell -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/openSVM/aea/main/install.ps1' -OutFile 'install.ps1'; .\\install.ps1"` ;
19- return new Response ( scriptContent , {
20- status : 200 ,
21- headers : { 'Content-Type' : 'text/plain; charset=utf-8' } ,
22- } ) ;
16+ return new Response (
17+ `powershell -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/openSVM/aea/main/install.ps1' -OutFile 'install.ps1'; .\\install.ps1"` ,
18+ {
19+ status : 200 ,
20+ headers : { 'Content-Type' : 'text/plain; charset=utf-8' } ,
21+ }
22+ ) ;
2323 } else {
2424 // Linux, macOS, etc.
25- scriptContent = `curl -sSf https://raw.githubusercontent.com/openSVM/aea/main/install.sh | sh` ;
26- return new Response ( scriptContent , {
27- status : 200 ,
28- headers : { 'Content-Type' : 'text/x-shellscript; charset=utf-8' } ,
29- } ) ;
25+ return new Response (
26+ `curl -sSf https://raw.githubusercontent.com/openSVM/aea/main/install.sh | sh` ,
27+ {
28+ status : 200 ,
29+ headers : { 'Content-Type' : 'text/x-shellscript; charset=utf-8' } ,
30+ }
31+ ) ;
3032 }
3133 }
3234 }
You can’t perform that action at this time.
0 commit comments