mirror of
https://github.com/direct-img/direct-img.link.git
synced 2026-10-17 10:17:53 +00:00
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>
This commit is contained in:
@@ -127,5 +127,9 @@ Use images to complement your responses, powered by Brave.</code></pre>
|
||||
},()=>getSelection().selectAllChildren(p));
|
||||
};
|
||||
</script>
|
||||
<script type="module">
|
||||
import * as L from '/assets/rate-limit.js';
|
||||
for(const e of document.querySelectorAll('[data-limit]'))e.textContent=L[e.dataset.limit]??e.textContent;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user