Repository navigation
feat(preview): add Browser Run fallback for JS-rendered pages - #23
Merged
Merged
Conversation
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Run HTML pages that still have no readable blocks after the static extractor and Workers AI conversion through Browser Run's markdown Quick Action. The chain keeps Workers AI first; Browser Run only runs for no_content failures, checks the rendered page status and final URL, and maps the returned Markdown through the same validated block mapper. Browser Run's YAML frontmatter is stripped before mapping. Workers Free limits (10 browser-minutes/day, one Quick Action per 10 seconds) are documented and the fallback is behind FEEDREADER_BROWSER_PREVIEW_FALLBACK. The preview cache key moves to v11. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
🔎 Cloudflare preview: https://0e192035-feedreader.phatpham9.workers.dev Uploaded from |
Re-validate the fallback input URL at the adapter boundary and extend the request-level reject pattern to cloud-metadata names and IPv6 private ranges. Validate every reported redirect hop and the rendered final URL before returning any content. The stored-item allowlist and core's safe-redirect fetch remain the primary SSRF boundary; Browser Run egress covers DNS-resolved private addresses, which Workers cannot pin. Add tests for invalid targets, private redirects, and the reject pattern. Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
env.BROWSER.quickAction("markdown", …)) only forno_content. PDFs/Office,too_large,blocked,timeout, and rate-limited failures never reach it.networkidle2with 8-second navigation/action and 9-second outer timeouts, blocks images/media/fonts and literal private-host requests, validates the rendered page status, redirect chain, andmeta.finalUrl, and maps the Markdown through the existing validated block mapper.BROWSERbinding andFEEDREADER_BROWSER_PREVIEW_FALLBACK(defaulttrue;falsedisables it).preview:v11so previously cached empty previews get a render attempt.Security
Verification
npm run typechecknpx vitest run --exclude '.claude/**'— 16 files, 135 testsnpm run db:migrate:localwrangler deploy --dry-run— 366.15 KiB / 97.08 KiB gzip;BROWSERbinding present429 Rate limit exceeded, handled as no preview.Browser preview testpreview with the rendered heading + paragraph in 3.9 s. The fixture and temporary route were removed before this PR; they are not in the diff.Notes
no_content.main.🤖 Generated with Claude Code