Skip to content

site: same-origin avatars + dl.reasonix.io downloads (mainland access)#3923

Merged
esengine merged 1 commit into
main-v2from
site/china-friendly
Jun 11, 2026
Merged

site: same-origin avatars + dl.reasonix.io downloads (mainland access)#3923
esengine merged 1 commit into
main-v2from
site/china-friendly

Conversation

@esengine

Copy link
Copy Markdown
Owner

Two fixes for mainland-China access (and a general perf win everywhere):

Contributor avatars baked into the build. The community wall loaded 40+ images from avatars.githubusercontent.com, which is blocked in mainland China — visitors there saw a wall of broken images. A prebuild script now fetches the contributor list / stars / merged-PR count and downloads every avatar into public/av/, so the wall is served same-origin from reasonix.io with zero third-party requests. Failure handling: an avatar that fails to download keeps its remote URL, and the whole script degrades to the committed snapshot instead of ever failing the build.

Downloads on the R2 custom domain. Desktop download links and the runtime version check move from the rate-limited pub-*.r2.dev dev subdomain to the bucket's custom domain dl.reasonix.io. Verified live before switching: all three artifacts return 200 through Cloudflare and range requests return 206, so resumable downloads work.

public/av/ is build output and gitignored. The pages workflow already passes GITHUB_TOKEN into the build, which the prebuild script picks up to avoid anonymous rate limits.

Verified with a clean local build: 44/44 avatars baked, zero avatars.githubusercontent.com / r2.dev references left in the built HTML/JS.

…nto the build

Mainland-China visitors hit two walls on the new site: the contributor
wall loads 40+ images from avatars.githubusercontent.com (blocked
there), and downloads went through the rate-limited pub-*.r2.dev dev
subdomain.

- a prebuild script now fetches community stats and downloads every
  contributor avatar into public/av/, so the wall is served same-origin
  with zero third-party requests; any avatar that fails to fetch falls
  back to its remote URL, and the whole script degrades to the
  committed snapshot rather than failing the build
- download links and the runtime version check now use the R2 bucket's
  custom domain dl.reasonix.io (Cloudflare-cached, range requests
  verified) instead of pub-*.r2.dev
@esengine esengine requested a review from SivanCola as a code owner June 11, 2026 03:26
@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 11, 2026
@esengine esengine merged commit 842aff8 into main-v2 Jun 11, 2026
14 checks passed
@esengine esengine deleted the site/china-friendly branch June 11, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant