|
1 | 1 | # CF Image proxy
|
2 | 2 |
|
3 |
| -> Proxy CDN for caching static assets from third-party domains via [Cloudflare Workers](https://workers.cloudflare.com). |
| 3 | +> Image proxy and CDN for [Cloudflare Workers](https://workers.cloudflare.com). |
4 | 4 |
|
5 | 5 | [](https://github.com/transitive-bullshit/cf-image-proxy/actions/workflows/build.yml) [](https://prettier.io)
|
6 | 6 |
|
|
14 | 14 | - Respects `pragma: no-cache` and related headers
|
15 | 15 | - Used in hundreds of prod sites
|
16 | 16 |
|
17 |
| -## Config |
| 17 | +## Setup |
18 | 18 |
|
19 |
| -**All config is defined in [wrangler.toml](./wrangler.toml).** |
20 |
| - |
21 |
| -0. Create a new blank [Cloudflare Worker](https://workers.cloudflare.com). |
22 |
| -1. Fork / clone this repo |
23 |
| -2. Update the missing values in [wrangler.toml](./wrangler.toml) |
24 |
| -3. `npm install` |
25 |
| -4. `npm run dev` to test locally |
26 |
| -5. `npm run deploy` to deploy to cloudflare workers 💪 |
| 19 | +1. Create a new blank [Cloudflare Worker](https://workers.cloudflare.com). |
| 20 | +2. Fork / clone this repo |
| 21 | +3. Update the missing values in [wrangler.toml](./wrangler.toml) |
| 22 | +4. `npm install` |
| 23 | +5. `npm run dev` to test locally |
| 24 | +6. `npm run deploy` to deploy to cloudflare workers 💪 |
27 | 25 |
|
28 | 26 | ### wrangler.toml
|
29 | 27 |
|
@@ -96,6 +94,12 @@ A few notes about the implementation:
|
96 | 94 | - This means that our worker does not have access to Node.js primitives such as `fs`, `dns` and `http`.
|
97 | 95 | - It does have access to a custom [web fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
|
98 | 96 |
|
| 97 | +## TODO |
| 98 | + |
| 99 | +- [x] Initial release extracted from Notion2Site |
| 100 | +- [ ] Support restricting the origin domain in order to prevent abuse |
| 101 | +- [ ] Add a snazzy demo |
| 102 | + |
99 | 103 | ## License
|
100 | 104 |
|
101 | 105 | MIT © [Travis Fischer](https://transitivebullsh.it)
|
|
0 commit comments