Spaces:
Runtime error
Runtime error
Download cloudflare/worker.js from Dragoning/bingo-going: direct link, hf CLI and curl.
- Browser
- Download file 500 Bytes
-
https://huggingface.co/spaces/Dragoning/bingo-going/resolve/main/cloudflare/worker.js
- Command line
-
hf download hf://spaces/Dragoning/bingo-going/cloudflare/worker.js
-
curl -L -o worker.js https://huggingface.co/spaces/Dragoning/bingo-going/resolve/main/cloudflare/worker.js
500 Bytes
| const TRAGET_HOST='hf4all-bingo.hf.space' // 请将此域名改成你自己的,域名信息在设置》站点域名查看。 | |
| export default { | |
| async fetch(request) { | |
| const uri = new URL(request.url); | |
| if (uri.protocol === 'http:') { | |
| uri.protocol = 'https:'; | |
| return new Response('', { | |
| status: 301, | |
| headers: { | |
| location: uri.toString(), | |
| }, | |
| }) | |
| } | |
| uri.host = TRAGET_HOST | |
| return fetch(new Request(uri.toString(), request)); | |
| }, | |
| }; | |