Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
| 1 |
-
addEventListener('fetch', event => {
|
| 2 |
-
event.passThroughOnException()
|
| 3 |
-
|
| 4 |
-
event.respondWith(handleRequest(event))
|
| 5 |
-
})
|
| 6 |
-
|
| 7 |
/**
|
| 8 |
* Respond to the request
|
| 9 |
*/
|
|
@@ -230,4 +224,11 @@ const injectOutBody = (url, body)=>{
|
|
| 230 |
// return body.text();//.replace(/href: \"(.*?)\"/ig, "href:\"https://x-undefined-2-proxy-server.hf.space/"+domain+"$1\"")
|
| 231 |
// }
|
| 232 |
return body;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
/**
|
| 2 |
* Respond to the request
|
| 3 |
*/
|
|
|
|
| 224 |
// return body.text();//.replace(/href: \"(.*?)\"/ig, "href:\"https://x-undefined-2-proxy-server.hf.space/"+domain+"$1\"")
|
| 225 |
// }
|
| 226 |
return body;
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
export default{
|
| 230 |
+
async fetch(request, event){
|
| 231 |
+
event.passThroughOnException()
|
| 232 |
+
event.respondWith(handleRequest(event))
|
| 233 |
+
}
|
| 234 |
}
|