Commit Graph
5 Commits
Author SHA1 Message Date
multipleof4andClaude Opus 5.5 87f80ac956 Feat: Promote every ?i= and ?src=, measured by a WAF logging rule
Analytics has no query string, so a WAF custom rule logs image requests with
theirs and promote.js splits each path's views across its variants. The
rewrite names static files after the param values (/orange%2Bcat/i2-), since
the static file server redirects names with = or &. Drops the legacy
/free/5/x paths and the /1/ segment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 19:08:03 +00:00
multipleof4andClaude Opus 5.5 d2f8c8ffba Fix: Serve promoted images with a + without redirecting
Rule conditions see the original path, so chained rules can't encode +s. One
rule per number of +s does it instead, which only fits the free plan's 10
rules if they're shared by all sites, so static files now live under their
hostname (/free.direct-img.link/1/orange%2Bcat).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:11:59 +00:00
multipleof4andClaude Opus 5.5 b932044c5f Fix: Keep visitors' URLs unchanged for ?i= and promoted images with a +
The ?i= redirect is gone, so only bare queries are promoted, and the rewrite
encodes + as %2B so static files no longer redirect to their encoded name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:06:16 +00:00
multipleof4andClaude Opus 5.5 fdbd91aa19 Feat: Expire static images after 90 days like R2, and link top images to direct-img in ntfy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:58:06 +00:00
multipleof4andClaude Opus 5.5 32f742b73f Feat: Move from Pages to a Worker and serve popular images as static files
Static assets don't count toward the free plan's 100,000 requests a day, so a
daily GitHub Action promotes the most viewed images (by Cloudflare analytics)
from R2 into public/ before deploying, and reports to ntfy. Zone rules fold
the site and ?i= into the path, since static files ignore query strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:08:34 +00:00