diff --git a/danmu_api/worker.js b/danmu_api/worker.js index bed468c..c595264 100644 --- a/danmu_api/worker.js +++ b/danmu_api/worker.js @@ -68,7 +68,7 @@ async function get360Animes(title) { } let animes = []; - if (data.data.longData.length !== 0) { + if ('rows' in data.data.longData) { animes = data.data.longData.rows; } @@ -217,6 +217,10 @@ async function handleRequest(req, env) { }); } + if (path === "/favicon.ico" || path === "/robots.txt") { + return new Response(null, { status: 204 }); + } + // --- 校验 token --- const parts = path.split("/").filter(Boolean); // 去掉空段 if (parts.length < 2 || parts[0] !== token) {