Commit Graph
8 Commits
Author SHA1 Message Date
multipleof4andClaude Opus 5.5 bd8ef51591 Fix: Turn off Bing SafeSearch to match Brave
safesearch=moderate isn't a Bing parameter. Bing's filter is set by the
SRCHHPGUSR=ADLT=OFF cookie, so send that (plus adlt=off).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:45:20 +00:00
multipleof4andClaude Opus 5.5 6fb64e9d7b Feat: AI images on ai.direct-img.link, and as the fallback when a search finds nothing
ai.direct-img.link serves images from the AuroraIMG-6M API on our Dokploy
server (github.com/direct-img/AuroraIMG-6M) instead of searching. It takes
?src= (auroraimg-6m, case-insensitive, the default and only source for now)
and ?i=, where each i gets its own seed derived from the query, so it's a
different image of the same prompt. It has its own daily limit
(AI_DAILY_LIMIT) and AI: cache keys / ai/ R2 prefix. Failed generations
aren't cached, since they're likely temporary.

On direct-img.link and free.direct-img.link, a search that finds nothing (or
fewer than i working images) now serves an AI image of the query instead of
bad.webp. It's kept for 24h like failures were, so a later search can still
find a real image; bad.webp is only served if the AI image fails too. Its ttl
is stored in KV and R2 metadata so cache hits and deduped waiters send a
matching max-age.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 02:56:39 +00:00
multipleof4andClaude Opus 5.5 1ebcfc777e Perf: Serve homepage and assets without invoking Functions
Add _routes.json so /, /robots.txt and /assets/* skip the worker and
don't count against the Functions request quota. rate-limit.js moves to
assets/ so the homepage reads it client-side instead of via HTMLRewriter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 16:43:25 -07:00
multipleof4andClaude Opus 5.5 c76b1ba5f7 Feat: Homepage reads daily limits from rate-limit.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 16:35:46 -07:00
multipleof4andClaude Opus 5.5 826e0cd2dd Refactor: Move daily search limits into rate-limit.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 16:29:49 -07:00
multipleof4andClaude Opus 5.5 029b259f05 Feat: Add free.direct-img.link and ?i= result picker (#1)
- free.direct-img.link serves only unrestricted (public domain/CC0) images
  from Openverse (license=cc0,pdm) and Wikimedia Commons
  (haslicense:unrestricted), with optional ?src=openverse|wikimedia
- ?i=1..20 picks the i-th working image on both sites; broken links are
  skipped so every index is a different image
- Openverse OAuth token is cached in KV and refreshed automatically
- Skip Flickr "photo unavailable" placeholders (served with HTTP 200)
- Free/indexed cache keys use uppercase prefixes; plain main-site keys
  are unchanged so existing cache entries stay valid
- Update README, homepage, privacy policy and terms

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 12:00:54 -07:00
multipleof4 1fe9935fca Refactor: Extract Bing image search logic 2026-03-12 14:31:53 -07:00
multipleof4 deb931b466 Refactor: Extract Brave image search logic 2026-03-12 14:31:50 -07:00