A Cloudflare Worker that fetches a GitHub artifact zip file and returns it to the client.
-
Install dependencies:
npm install
-
Run locally:
npm run dev
-
Deploy to Cloudflare:
npm run deploy
Once deployed or running locally, simply make a request to your worker URL to fetch the GitHub artifact:
curl http://localhost:8787/brokenThis will fail because the token is forwarded to the upstream location.
curl http://localhost:8787/fixedThis will succeed because the token is not forwarded to the upstream location.
The equivalent functionality is also in ./node.js.
To run with follow redirects using the default node:
node ./node.js default
200A manual implementation of the correct behaviour:
node ./node.js fixed
200A manual implementation of the incorrect behaviour that cloudflare workers use:
node ./node.js fixed
200