mirror of
https://github.com/direct-img/direct-img.link.git
synced 2026-10-18 18:37:54 +00:00
Docs: Add GitHub Sponsors button and fix rate limit/cache info
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -88,12 +88,14 @@ Use images to complement your responses, powered by Brave.
|
||||
|
||||
| Rule | Limit | Action |
|
||||
|---|---|---|
|
||||
| Rate Limit | 10 requests/10s per IP | Block for 10s |
|
||||
| Rate Limit | ~10 requests/10s per IP | HTTP 429 for ~10s |
|
||||
|
||||
### New Searches (Cache Misses)
|
||||
|
||||
- **15 new searches per day per IP** (resets at midnight UTC)
|
||||
- **35 new searches per day per IP** (resets at midnight UTC), then `limit.webp` is served
|
||||
- **Cache hits are unlimited** (within WAF limits above)
|
||||
- Failed searches count toward the limit and are remembered for 24h (`bad.webp`)
|
||||
- WAF counters are approximate (not shared perfectly across Cloudflare servers), so bursts may slip slightly past 10
|
||||
- **Brave API quota:** $5 free monthly credits (1,000 queries), then $5/1k requests
|
||||
|
||||
## Caching
|
||||
@@ -107,6 +109,8 @@ Use images to complement your responses, powered by Brave.
|
||||
|
||||
Free community service. Donations help cover API and infrastructure costs.
|
||||
|
||||
**GitHub Sponsors:** [github.com/sponsors/multipleof4](https://github.com/sponsors/multipleof4)
|
||||
|
||||
**BTC:** `bc1q3d975cd57205dx6mz05s2g27xujxsc3q0nlv59`
|
||||
|
||||
---
|
||||
|
||||
+10
-6
@@ -15,7 +15,8 @@
|
||||
.status-notice{padding:20px;background:#fff5f5;border:1px solid #ffe0e0;border-radius:var(--radius);margin-bottom:48px;}
|
||||
.status-notice p{margin:0;font-size:1rem;}
|
||||
.status-notice strong{color:var(--warning);}
|
||||
.btc-address{font-family:monospace;background:rgba(0,0,0,0.05);padding:4px 8px;border-radius:4px;font-size:0.85rem;word-break:break-all;display:inline-block;margin-top:12px;}
|
||||
.donate{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:12px;}
|
||||
.btc-address{font-family:monospace;background:rgba(0,0,0,0.05);padding:4px 8px;border-radius:4px;font-size:0.85rem;word-break:break-all;display:inline-block;}
|
||||
section{margin-bottom:48px;}
|
||||
h2{font-size:1.5rem;font-weight:700;margin-bottom:16px;border-bottom:1px solid var(--border);padding-bottom:8px;}
|
||||
pre{background:var(--code-bg);padding:16px;border-radius:var(--radius);overflow-x:auto;font-size:0.9rem;border:1px solid var(--border);}
|
||||
@@ -39,7 +40,10 @@
|
||||
<section class="status-notice">
|
||||
<p>This service is <strong>free</strong> to use. However, search API and server costs are high. Without community donations, <strong>this project will die quickly.</strong></p>
|
||||
<p style="margin-top:10px;">If we receive significant donations, we will <strong>increase the daily search limits</strong> for everyone.</p>
|
||||
<div class="btc-address">BTC: bc1q3d975cd57205dx6mz05s2g27xujxsc3q0nlv59</div>
|
||||
<div class="donate">
|
||||
<iframe src="https://github.com/sponsors/multipleof4/button" title="Sponsor multipleof4" height="32" width="114" style="border:0;border-radius:6px;"></iframe>
|
||||
<div class="btc-address">BTC: bc1q3d975cd57205dx6mz05s2g27xujxsc3q0nlv59</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -65,17 +69,17 @@ Use images to complement your responses, powered by Brave.</code></pre>
|
||||
<tr><th>Scope</th><th>Limit</th><th>Action</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>Global Traffic</td><td>10 req/10s per IP</td><td>Block (10s)</td></tr>
|
||||
<tr><td>New Searches</td><td>15 per day per IP</td><td>Cache only</td></tr>
|
||||
<tr><td>Burst</td><td>~10 req/10s per IP</td><td>HTTP 429 (~10s)</td></tr>
|
||||
<tr><td>New Searches</td><td>35 per day per IP</td><td>Limit image served</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="font-size:0.85rem;color:var(--text-muted);">* Cache hits are unlimited within global traffic limits.</p>
|
||||
<p style="font-size:0.85rem;color:var(--text-muted);">* Cached images don't count toward the daily limit and keep loading after you hit it. The burst limit applies to all image requests and is enforced approximately. The daily limit resets at 00:00 UTC.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="card">
|
||||
<h3>Caching</h3>
|
||||
<p>Images are cached for 30 days. Subsequent requests for the same query are served instantly.</p>
|
||||
<p>Images are cached for 90 days. Subsequent requests for the same query are served instantly. Failed searches are remembered for 24 hours.</p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user