mirror of
https://github.com/wahyd4/iptv-cloudflare-proxy.git
synced 2026-08-09 05:06:19 +10:00
Create _worker.js
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
const domain = "live.cooltv.top"
|
||||
export default {
|
||||
async fetch(request, env) {
|
||||
let url = new URL(request.url);
|
||||
if (url.pathname.startsWith('/')) {
|
||||
url.hostname = domain;
|
||||
let new_request = new Request(url, request);
|
||||
return fetch(new_request);
|
||||
}
|
||||
return env.ASSETS.fetch(request);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user