{"id":23408889,"url":"https://github.com/m3dzik/wrangler-cdn","last_synced_at":"2025-04-11T23:53:00.636Z","repository":{"id":37048905,"uuid":"402150044","full_name":"M3DZIK/wrangler-cdn","owner":"M3DZIK","description":"Cloudflare Worker to proxy Imgur :rocket:","archived":false,"fork":false,"pushed_at":"2023-01-30T18:27:57.000Z","size":821,"stargazers_count":15,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T23:52:55.742Z","etag":null,"topics":["cdn","cloudflare","cloudflare-workers","image","imgur","proxy","reverse-proxy","typescript","wrangler"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/M3DZIK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-01T17:38:36.000Z","updated_at":"2024-10-20T12:34:45.000Z","dependencies_parsed_at":"2023-02-16T10:15:53.058Z","dependency_job_id":null,"html_url":"https://github.com/M3DZIK/wrangler-cdn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"cloudflare/worker-typescript-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M3DZIK%2Fwrangler-cdn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M3DZIK%2Fwrangler-cdn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M3DZIK%2Fwrangler-cdn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/M3DZIK%2Fwrangler-cdn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/M3DZIK","download_url":"https://codeload.github.com/M3DZIK/wrangler-cdn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497851,"owners_count":21113984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdn","cloudflare","cloudflare-workers","image","imgur","proxy","reverse-proxy","typescript","wrangler"],"created_at":"2024-12-22T15:17:57.143Z","updated_at":"2025-04-11T23:53:00.608Z","avatar_url":"https://github.com/M3DZIK.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare Workers to proxy Imgur\n\nProxy Imgur images using Cloudflare Workers\n\n## 🚀 Installation\n\nRoughly you'll follow these steps to install a wrangler-cdn instance to Cloudflare:\n\n1. Fork the [wrangler-cdn repo](https://github.com/M3DZIK/wrangler-cdn) to your personal (or organizational) GitHub account.\n2. Obtain Cloudflare API tokens and save them as secrets on your forked GitHub repository.\n3. Use the predefined GitHub Action in your forked repository to deploy the code to Cloudflare Pages, using the secrets from step 2.\n4. Make a few clicks on Cloudflare's dashboard to set up custom domains and configure some security settings.\n5. Done!\n\n### Prerequisites\n\n* Have a Cloudflare account. If you don't have one already, you can [sign up for free at Cloudflare.com](https://dash.cloudflare.com/sign-up).\n* Have a GitHub account. If you don't have one, you can [sign up for free at GitHub.com](https://github.com/signup).\n\n### Step 1. Fork the wrangler-cdn repo to your GitHub\n\nSimply click on [https://github.com/M3DZIK/wrangler-cdn/fork](https://github.com/M3DZIK/wrangler-cdn/fork) to fork the repository.\n\nYou may choose to modify the code in your forked repository in the future, but it's likely that you won't need to\ntouch the code at all. Simply fork the repository and keep it synced for future use.\n\n### Step 2. Put some secrets on your forked repo\n\nGo to your forked repo's [Settings -\u003e Secrets -\u003e Actions](../../settings/secrets/actions), and create 3 secrets (click for more details).\nWith these secrets in place, you'll be able to use GitHub Actions to deploy your wrangler-cdn instance to Cloudflare Pages.\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eCLOUDFLARE_ACCOUNT_ID\u003c/b\u003e\u003c/summary\u003e\n\nYou can get your cloudflare account id from your dashboard's url:\n\nAfter you [login your Cloudflare account](https://dash.cloudflare.com/login?lang=en-US), you'll be redirected to a url like this\n```\nhttps://dash.cloudflare.com/[your-cloudflare-account-id-here]\n```\nThe last part of the url is your cloudflare account id.\n\nFor example, if you see a url like this:\n```\nhttps://dash.cloudflare.com/fff88980eeeeedcc3ffffd4f555f4999\n```\n\nThen you'll set **CLOUDFLARE_ACCOUNT_ID** to **fff88980eeeeedcc3ffffd4f555f4999**:\n\n\u003cimg width=\"846\" alt=\"CF account ID\" src=\"https://user-images.githubusercontent.com/1719237/208216752-56f00f51-29cb-43ea-b720-75244719898d.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eCLOUDFLARE_API_TOKEN\u003c/b\u003e\u003c/summary\u003e\n\nYou'll need to create an API token here: [https://dash.cloudflare.com/profile/api-tokens](https://dash.cloudflare.com/profile/api-tokens)\n\nCreate a custom token:\n\n\u003cimg width=\"925\" alt=\"create_token\" src=\"https://user-images.githubusercontent.com/1719237/205525627-14da54ae-1733-4db5-b65d-94f5ec48f360.png\"\u003e\n\nWe need edit permission for Cloudflare workers scripts:\n\n\u003cimg width=\"990\" alt=\"permissions\" src=\"https://user-images.githubusercontent.com/25513724/215381483-2101f57b-a0d1-4217-899a-0b10b6011546.png\"\u003e\n\n\nFinally, copy the API token here:\n\n\u003cimg width=\"682\" alt=\"API_token\" src=\"https://user-images.githubusercontent.com/1719237/205525785-6fed8e49-7342-4b36-9d07-348e1c28cbcc.png\"\u003e\n\n  \u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eCLOUDFLARE_PROJECT_NAME\u003c/b\u003e\u003c/summary\u003e\n\nA legit project name should have these characters: [a-z], [A-Z], [0-9], and -\n\nWe recommend using the custom domain name that you'll use for this project and replace dot (.) with dash (-)\n\nFor example, if you use photos.mycustomdomain.com, then the project name should be photos-mycustomdomain-com\n\nNote: Don't use underscore (_), space ( ), and other characters outside [a-z], [A-Z], [0-9] and -. Or Cloudflare Pages won't let you create a project.\n\u003c/details\u003e\n\n\n### Step 3. Run GitHub Action to deploy code\n\nGo to [Actions -\u003e Deploy to Cloudflare Pages](../../actions/workflows/deploy.yml) and run Workflow\n\n\u003cimg width=\"1606\" alt=\"deploy\" src=\"https://user-images.githubusercontent.com/1719237/205526856-05ea0ff4-703a-4d08-bc7f-4ae2dfc07cfe.png\"\u003e\n\nIf you see the green checkmark, then the deployment is successful. And you can see a Pages project in your [Cloudflare dashboard](https://dash.cloudflare.com/sign-up/pages).\nYou can access the site via `${CLOUDFLARE_PROJECT_NAME}.pages.dev`\n\u003c/details\u003e\n\n**Big thanks to [Bad3r](https://github.com/Bad3r) for creating the documentation!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm3dzik%2Fwrangler-cdn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm3dzik%2Fwrangler-cdn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm3dzik%2Fwrangler-cdn/lists"}