Download worker.js from kirimdata369/task-manager-pro: direct link, hf CLI and curl.
- Browser
- Download file 1.93 kB
-
https://huggingface.co/spaces/kirimdata369/task-manager-pro/resolve/main/worker.js
- Command line
-
hf download hf://spaces/kirimdata369/task-manager-pro/worker.js
-
curl -L -o worker.js https://huggingface.co/spaces/kirimdata369/task-manager-pro/resolve/main/worker.js
1.93 kB
| export default { | |
| async fetch(request, env) { | |
| const url = new URL(request.url); | |
| // --- ZETA CLOAKING CONFIG --- | |
| const TARGET_CORE = "https://pundiuang369-zeta-sovereign-core.hf.space"; | |
| // --- CORS OBLITERATION --- | |
| const corsHeaders = { | |
| 'Access-Control-Allow-Origin': '*', | |
| 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS', | |
| 'Access-Control-Allow-Headers': '*', | |
| }; | |
| if (request.method === 'OPTIONS') { | |
| return new Response(null, { headers: corsHeaders }); | |
| } | |
| // --- STEALTH PROXY ENGINE --- | |
| // Redirecting all traffic to the Hugging Face Space while masking the URL | |
| const proxyUrl = new URL(url.pathname + url.search, TARGET_CORE); | |
| const modifiedRequest = new Request(proxyUrl, { | |
| method: request.method, | |
| headers: request.headers, | |
| body: request.body, | |
| redirect: 'follow' | |
| }); | |
| try { | |
| const response = await fetch(modifiedRequest); | |
| // Create a new response so we can modify the headers | |
| const newResponse = new Response(response.body, response); | |
| // Inject CORS for global accessibility | |
| Object.keys(corsHeaders).forEach(key => { | |
| newResponse.headers.set(key, corsHeaders[key]); | |
| }); | |
| // Masking Server Headers for additional stealth | |
| newResponse.headers.set('Server', 'ZETA-GATEWAY/5.0 (Stealth)'); | |
| newResponse.headers.delete('X-Powered-By'); | |
| return newResponse; | |
| } catch (err) { | |
| return new Response(`[CRITICAL_FAILURE] Zeta Stealth Gateway collapsed: ${err.message}`, { | |
| status: 500, | |
| headers: { 'Content-Type': 'text/plain' } | |
| }); | |
| } | |
| } | |
| }; | |