cdn.blueat.net is an alternative to the Bluesky CDN that's just as fast but powered by Cloudflare Workers with extra features. cdn.blueat.net
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 40 lines 1.5 kB view raw view rendered
1# cdn.blueat.net Worker (AT Protocol Image CDN) 2 3Cloudflare Worker that acts as a drop-in style replacement for Bluesky image CDN endpoints by proxying image blobs directly from a user's Personal Data Server (PDS). It resolves the PDS endpoint from the DID (supports `did:web:` and `did:plc:`) and then fetches the requested blob. 4 5## Quick deploy (to your own Cloudflare account) 6 71. Install Node.js (LTS). 82. From this folder, run: 9 - `npm install` 10 - `npm run deploy` 113. If prompted, run `wrangler login` (Wrangler stores your auth token locally). 12 13The included `wrangler.toml` deploys with `workers_dev = true` (so it will be reachable under your Worker subdomain). To serve the real domain (`cdn.blueat.net`), update `wrangler.toml` with your `route` and `zone_id`. 14 15## Configuration 16 17In `wrangler.toml`, you can change: 18 19- `PLC_DIRECTORY`: base URL used to resolve `did:plc:` to a PLC document. 20- `CACHE_MAX_AGE_SECONDS`: value used for the `Cache-Control: s-maxage=...` header. 21 22## Local development 23 24- `npm run dev` 25 26## Request format 27 28This worker expects paths like: 29 30`/img/{type}/plain/{did}/{cid}` 31 32Where `{type}` is typically `avatar` or `banner`. Example: 33 34`/img/avatar/plain/did:plc:exampleCid/ExampleImageCid` 35 36## Notes 37 38- Results are cached via `caches.default` and also include `Cache-Control` for downstream caching. 39- If the requested `avatar`/`banner` CID is missing, the worker tries to find the current CID from the profile record and retries once. 40