A simple Cloudflare worker for scraping. Comes with authentication out of the box.
- Simple setup on free Cloudflare worker.
- Supports auth by API key out of the box.
- Returns content quickly with underrstandable messages.
- Variety of use cases, from obscuring IP address to bypassing CORS.
- Make a
wrangler.toml
file in the project root. - Add the below content:
name = "finned-proxy"
main = "src/index.js"
compatibility_date = "2023-02-27"
[vars]
API_KEY = "<a secure string here>"
Note that API_KEY
is a random string that you make yourself. This will be the authentication you need to pass to the app in order to make requests.
3. Save the file
- Start the application.
npm start
- If you have not already, you will be prompted to sign in to Cloudflare.
- Test the application:
curl "https://finned-proxy.npiqwxyai.workers.dev/?auth=<api key>&url=<url to retrieve>"
- Publish the site to Cloudflare:
npx wrangler publish
MIT