Skip to content

feat(NODE-1947): Add pre-renderer proxying#199

Merged
blind-oracle merged 5 commits into
mainfrom
igor/caffeine-prerender
May 8, 2026
Merged

feat(NODE-1947): Add pre-renderer proxying#199
blind-oracle merged 5 commits into
mainfrom
igor/caffeine-prerender

Conversation

@blind-oracle
Copy link
Copy Markdown
Collaborator

@blind-oracle blind-oracle commented May 8, 2026

Currently for Caffeine to allow crawlers like GoogleBot to index the site.

If the request is to one of the configured domains, then we check if the request is eligible for pre-rendering and proxy it to the pre-render worker. If it's not eligible or the pre-render request fails - then we forward it as-is to the canister.

Conditions:

  • GET
  • User-Agent is a bot (new is_bot middleware handles that)
  • Not a static asset
  • Not a draft app

@blind-oracle blind-oracle requested a review from a team as a code owner May 8, 2026 08:18
Copy link
Copy Markdown

@frankdavid frankdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not too tedious, consider adding an E2E test (with a mock http client for the prerendering service).

Comment thread src/routing/middleware/prerender.rs Outdated
Comment thread src/routing/middleware/prerender.rs Outdated
Comment thread src/routing/middleware/prerender.rs Outdated
Comment thread src/routing/middleware/prerender.rs Outdated
Comment thread src/routing/middleware/prerender.rs Outdated
Comment thread src/routing/middleware/prerender.rs Outdated
Comment thread src/routing/middleware/prerender.rs Outdated
@blind-oracle blind-oracle merged commit a4efcfe into main May 8, 2026
6 checks passed
@blind-oracle blind-oracle deleted the igor/caffeine-prerender branch May 8, 2026 12:45
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.

2 participants