feat: simplify asset serving and enhance bootstrap response handling

This commit is contained in:
shuaiplus
2026-03-19 00:52:58 +08:00
parent facd0ea5f7
commit 5ff322d809
5 changed files with 43 additions and 43 deletions
+6
View File
@@ -175,6 +175,12 @@ export async function handlePublicRoute(
});
}
if ((path === '/api/web-bootstrap' || path === '/web-bootstrap') && method === 'GET') {
const blocked = await enforcePublicRateLimit('public-read', LIMITS.rateLimit.publicReadRequestsPerMinute);
if (blocked) return blocked;
return jsonResponse(buildWebBootstrapResponse(env));
}
const iconMatch = path.match(/^\/icons\/([^/]+)\/icon\.png$/i);
if (iconMatch && method === 'GET') {
return handleWebsiteIcon(iconMatch[1]);