Deliver GitHub files at
edge speed

Eclipse CDN turns any GitHub repository into an instant, globally distributed asset network. No config. No cost.

eclipsecdnworker.eclipseservice.workers.dev
300+ Edge Locations
<10ms Median TTFB
Free Always

Everything you need,
nothing you don't.

Eclipse CDN is purpose-built for GitHub assets — fast, simple, and entirely free.

GitHub-native

Point it at any public GitHub repo. Use a tag, commit hash, branch, or @latest for auto-resolution. It just works.

Global Edge Network

Served via Cloudflare Workers across 300+ data centers. Files are cached at the edge closest to your users automatically.

CORS Everywhere

Every response includes permissive CORS headers, so you can load assets directly from the browser without any server-side proxying.

Smart MIME Types

Automatic content-type detection for JS, CSS, fonts, images, WASM, JSON, and more — no manual configuration needed.

Immutable Caching

Versioned URLs are cached with immutable directives. Branches get smart stale-while-revalidate headers.

Zero Config Deploy

One wrangler deploy and you're live. No origin servers, no storage buckets, no infrastructure headaches.

How to use Eclipse CDN

Everything you need to get assets loading at global edge speed.

URL Format

All Eclipse CDN URLs follow a consistent pattern. Currently, only GitHub repositories are supported.

pattern https://eclipsecdnworker.eclipseservice.workers.dev/gh/:user/:repo@:version/:file
SegmentDescriptionExample
/gh/GitHub provider prefix (required)/gh/
:userGitHub username or org namejquery
:repoRepository namejquery
@:versionTag, branch, commit SHA, or @latest@3.7.1
:fileFile path within the repodist/jquery.min.js

Note: Only public GitHub repositories are supported. Private repositories require a personal access token configured in the worker environment.

Versioning

Eclipse CDN supports multiple ways to reference a specific version of a file from GitHub.

tag / release /gh/user/repo@3.7.1/dist/file.min.js
latest release /gh/user/repo@latest/dist/file.min.js
branch /gh/user/repo@main/src/index.js
commit sha /gh/user/repo@a1b2c3d/dist/file.js

Production tip: Always pin to a specific tag or commit SHA in production. Using @main or @latest means the cached file can change on the next cache bust. Tags and commit SHAs are served with immutable cache headers.

Examples

Drop-in examples for common use cases — load anything from any public GitHub repo.

HTML — script tag <script src="https://eclipsecdnworker.eclipseservice.workers.dev/gh/jquery/jquery@3.7.1/dist/jquery.min.js"></script>
HTML — stylesheet <link rel="stylesheet" href="https://eclipsecdnworker.eclipseservice.workers.dev/gh/twbs/bootstrap@5.3.3/dist/css/bootstrap.min.css">
JavaScript — dynamic import const mod = await import( "https://eclipsecdnworker.eclipseservice.workers.dev/gh/user/repo@1.0.0/src/module.js" );
CSS — @import @import url("https://eclipsecdnworker.eclipseservice.workers.dev/gh/user/repo@main/styles/theme.css");
fetch API const res = await fetch( "https://eclipsecdnworker.eclipseservice.workers.dev/gh/user/repo@latest/data/config.json" ); const config = await res.json();

Response Headers

Every Eclipse CDN response includes these headers for debugging and integration.

  • X-Eclipse-CDNAlways 1. Confirms the response passed through Eclipse CDN.
  • X-Eclipse-SourceThe resolved path in gh/user/repo@ref/file format.
  • X-Eclipse-UpstreamThe exact raw.githubusercontent.com URL fetched upstream.
  • Cache-Controlimmutable for tags/commits; stale-while-revalidate for branches.
  • Content-TypeAutomatically detected from file extension.
  • Access-Control-Allow-Origin* — CORS open for all origins.
  • Timing-Allow-Origin* — allows Resource Timing API access.

Caching Strategy

Eclipse CDN uses Cloudflare's edge cache and an optional KV namespace to maximize performance and minimize GitHub API calls.

Ref TypeCache-ControlTTL
Tag / Release (e.g. @1.0.0)public, immutable24 hours (edge)
Commit SHApublic, immutable24 hours (edge)
@latestpublic, stale-while-revalidate1 hour + 24h stale
Branch (main, master, etc.)public, stale-while-revalidate1 hour + 24h stale

KV caching stores resolved @latest tag lookups for 1 hour to avoid hitting the GitHub API on every request. Configure the ECLIPSE_CACHE KV binding in your wrangler.toml to enable this.

Error Responses

When something goes wrong, Eclipse CDN returns a JSON error body with a descriptive message.

404 — file not found { "error": "File not found on GitHub", "status": 404, "details": { "user": "jquery", "repo": "jquery", "ref": "9.9.9", "file": "dist/jquery.min.js" } }
StatusMeaning
400Invalid URL format — check the path structure
403GitHub rate limit hit or repo is private
404File, repo, or ref does not exist on GitHub
405Only GET and HEAD are supported

Self-Hosting

Eclipse CDN is open source and designed to be trivially deployable on your own Cloudflare account in under five minutes.

1 — clone & install git clone https://github.com/xXmizzeryXx/eclipse-cdn cd eclipse-cdn npm install -g wrangler
2 — create KV namespace wrangler kv:namespace create ECLIPSE_CACHE # Copy the id into wrangler.toml
3 — deploy wrangler deploy

Optional: Add a GITHUB_TOKEN secret via wrangler secret put GITHUB_TOKEN to increase your GitHub API rate limit from 60 to 5,000 requests/hour.

Start delivering at the edge

Join the Eclipse community or deploy your own instance in minutes — completely free.