{"id":51664919,"url":"https://github.com/thunderbird/avatars","last_synced_at":"2026-07-14T19:34:40.155Z","repository":{"id":370493663,"uuid":"1247912798","full_name":"thunderbird/avatars","owner":"thunderbird","description":"Sender-domain avatar proxy for Thunderbird webmail","archived":false,"fork":false,"pushed_at":"2026-05-24T02:59:59.000Z","size":47,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-09T13:28:33.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thunderbird.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-24T00:18:21.000Z","updated_at":"2026-05-25T16:10:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/thunderbird/avatars","commit_stats":null,"previous_names":["thunderbird/avatars"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/thunderbird/avatars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Favatars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Favatars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Favatars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Favatars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thunderbird","download_url":"https://codeload.github.com/thunderbird/avatars/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Favatars/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35476731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-07-14T19:34:39.409Z","updated_at":"2026-07-14T19:34:40.143Z","avatar_url":"https://github.com/thunderbird.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# avatars\n\nCloudflare Worker that serves sender-domain avatar images for Thunderbird\nwebmail.\n\nThe service accepts a normalized domain on `avatars.thunderbird.net` and\nalways returns a PNG, falling back to a 1x1 transparent pixel on errors:\n\n```text\nhttps://avatars.thunderbird.net/example.com?v=3\n```\n\nThe optional `v` query parameter is a cache version chosen by the caller.\nChanging it forces a fresh edge/browser cache entry when avatar lookup\nbehavior changes. It is not sent to upstream providers.\n\n## Behavior\n\n- Accepts only `GET`, `HEAD`, and `OPTIONS`. Other methods get a 405 fallback.\n- Normalizes and validates the domain before making any upstream request.\n- Fetches favicons only from `https://www.google.com/s2/favicons`. Because\n  Google reliably redirects this endpoint to its CDN, redirects are followed\n  and the final response is required to come from `www.google.com` or a\n  `*.gstatic.com` subdomain over HTTPS. Bare `gstatic.com` and any `http:`\n  downgrade are rejected.\n- Returns only PNG bodies up to 256 KiB, validating the PNG signature, chunk\n  structure, IHDR/PLTE/IDAT/IEND ordering, color-type/bit-depth combinations,\n  and CRC-32 of every chunk before responding or caching. Provider response\n  headers are not trusted.\n- Successful responses, validation failures, and Google 4xx responses are all\n  cached in Cloudflare's default Cache API under a versioned key\n  (`/__cache/\u003cprovider-version\u003e/\u003cdomain\u003e`). Validation failures are negative-\n  cached for one hour; transient network failures (502) are not cached.\n- `HEAD` requests share the `GET` cache and populate it on miss, so a `HEAD`\n  costs no more than a `GET` and never bypasses the edge.\n- Sends wildcard CORS headers, `X-Content-Type-Options: nosniff`, and\n  `Cross-Origin-Resource-Policy: cross-origin` on every PNG response.\n- Keeps Worker observability logging disabled.\n\n### Known limitations\n\n- Google's favicon service responds with a generic \"globe\" placeholder for\n  domains it does not know about. The worker has no signal to distinguish\n  this from a real favicon and will cache the placeholder under the requested\n  domain for the configured TTL. Operators that want to fail-closed for\n  unknown domains should change the `v` query parameter or bump\n  `AVATAR_CACHE_PROVIDER_VERSION` after fixing the heuristic.\n\n## Development\n\nUse Node.js 24 or newer.\n\n```bash\nnpm ci\nnpm run typecheck\nnpm test\n```\n\nRun locally with Wrangler:\n\n```bash\nnpx wrangler dev\n```\n\n## Deployment\n\nThe production custom domain `avatars.thunderbird.net` is attached to the\nWorker once in Cloudflare using human credentials. The steady-state GitHub\nActions deploy updates only the Worker script, so the CI token does not\nneed DNS or Worker route permissions.\n\nRequired repository secrets:\n\n- `CLOUDFLARE_ACCOUNT_ID`\n- `CLOUDFLARE_API_TOKEN`\n\nThe deploy token is scoped with only Workers script write/edit permissions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunderbird%2Favatars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthunderbird%2Favatars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunderbird%2Favatars/lists"}