Skip to content

Charge the Lightpanda headless browser like a training crawler - #39

Merged
ralyodio merged 1 commit into
masterfrom
fix/lightpanda-bot
Oct 6, 2026
Merged

ralyodio merged 1 commit into
masterfrom
fix/lightpanda-bot

Conversation

@ralyodio

@ralyodio ralyodio commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Why

The site showed 322 "active users". In the dev2 nginx log for the last hour, 21,263 of 24,787 requests (86%) came from Lightpanda/1.0, spread over 999 residential IPs. Each IP loads one page, fires Next's link prefetches (~81 requests in ~27 s), and leaves. That never trips the 100/min per-address throttle. Because Lightpanda runs JS, every one of those visits counted as a live visitor in analytics.

What

  • src/lib/crawl-gateway.ts: adds "Lightpanda" to TRAINING, so it gets a 402 with the crawl-pass offer, the same as GPTBot. robots.txt now names it as well.
  • test/crawl-gateway.test.mjs: Lightpanda gets 402 on page loads and on RSC prefetches, a real Chrome request passes through, and robots.txt stays readable. The two Lightpanda tests fail without the change.

bun test: 36 pass. tsc --noEmit: clean.

🤖 Generated with Claude Code

…crawler

Lightpanda/1.0 was 86% of p0dcasters traffic on 2026-10-06 (21,263 of
24,787 requests in an hour) from 999 residential addresses. Each one loads
a page plus its prefetches (~81 requests in 27 s) and leaves, so it never
crosses the 100/min per-address allowance. It runs JavaScript, so every
visit showed up as a live reader in analytics (322 "active users").

It names itself, so it goes on the TRAINING list: 402 with the crawl-pass
offer, and robots.txt now names it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit d2387eb into master Oct 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant