diff --git a/Dockerfile b/Dockerfile index 19b298d..2007758 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ RUN find ./src -type f -name "route.ts" -print0 \ ENV DOCKER_ENV=true # 海报走站内 /api/image-proxy(浏览器直连豆瓣图被拦导致全裂) ENV NEXT_PUBLIC_IMAGE_PROXY=/api/image-proxy -ENV NEXT_PUBLIC_SITE_VERSION=fixed120 +ENV NEXT_PUBLIC_SITE_VERSION=fixed121 ENV NEXT_PUBLIC_ENABLE_REGISTER=true # For Docker builds, force dynamic rendering to read runtime environment variables. @@ -56,7 +56,7 @@ ENV HOSTNAME=0.0.0.0 ENV PORT=3000 ENV DOCKER_ENV=true ENV NEXT_PUBLIC_IMAGE_PROXY=/api/image-proxy -ENV NEXT_PUBLIC_SITE_VERSION=fixed120 +ENV NEXT_PUBLIC_SITE_VERSION=fixed121 ENV NEXT_PUBLIC_ENABLE_REGISTER=true # 从构建器中复制 standalone 输出 diff --git a/src/app/api/filter/route.ts b/src/app/api/filter/route.ts index 7ce561e..d987b77 100644 --- a/src/app/api/filter/route.ts +++ b/src/app/api/filter/route.ts @@ -166,7 +166,7 @@ async function browseSite( const batch = Math.min(Math.max(opts.batch || BATCH_DEFAULT, 1), 6); const want = 24; const maxPages = 30; - const list: any[] = []; + let list: any[] = []; let hasMore = true; let fetched = 0; while (hasMore && fetched < maxPages) { @@ -191,6 +191,7 @@ async function browseSite( }); if (list.length >= want || !hasMore) break; } + list = list.slice(0, 50); return { list, next_pg: pg, has_more: hasMore }; } @@ -222,7 +223,7 @@ async function browseAll( ) ); const seen = new Set(); - const list: any[] = []; + let list: any[] = []; let hasMore = false; let nextPg = Infinity; per.forEach((r) => { @@ -236,6 +237,7 @@ async function browseAll( } }); }); + list = list.slice(0, 50); return { list, next_pg: nextPg === Infinity ? pg + 1 : nextPg, has_more: hasMore }; }