Skip to content

Add Hapi.js middleware#2

Open
Lasalot wants to merge 8 commits into
mainfrom
add-prerender-hapi
Open

Add Hapi.js middleware#2
Lasalot wants to merge 8 commits into
mainfrom
add-prerender-hapi

Conversation

@Lasalot
Copy link
Copy Markdown
Collaborator

@Lasalot Lasalot commented Apr 21, 2026

Initial implementation of the Prerender.io integration for hapi.

Comment thread index.js Outdated
Comment thread test/smoke.test.js
Comment thread index.js
Comment thread package.json
Comment on lines +20 to +21
"url": "git://github.com/prerender/integrations",
"directory": "prerender-hapi"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

mmm shouldn't it be prerender/hapi?

Comment thread index.js
Comment thread index.js
Comment thread index.js
Comment thread index.js
Comment on lines +62 to +64
if (settings.token) {
headers['X-Prerender-Token'] = settings.token;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

maybe we can log a warning here, could be useful to debug for the client.

giovanniRodighiero and others added 6 commits April 29, 2026 15:50
Adds fail-fast: false and npm cache for parity with koa workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Lets the backend correlate requests with a specific integration version
and uniquely identify each request for support triage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Asserts the outgoing wire-protocol shape (URL composition, required and
optional headers, X-Prerender-Int-Type value, Int-Version semver,
Request-Id UUID format and per-request uniqueness, query-string
preservation) — surfaces that the existing smoke tests don't cover.

Mock server lives at prerender/integration-contract and is fetched in
CI before tests run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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