Skip to content

fix: forward only a header allowlist to Prerender - #6

Open
Lasalot wants to merge 1 commit into
mainfrom
fix/forward-header-allowlist
Open

Lasalot wants to merge 1 commit into
mainfrom
fix/forward-header-allowlist

Conversation

@Lasalot

@Lasalot Lasalot commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

What

Forward only an allowlist of request headers (user-agent, accept, accept-language) to service.prerender.io in both worker-subscriber.js and worker-custom-domain.js, instead of copying every inbound header.

Why

Copying all inbound headers let a client inject Prerender's own control headers — notably X-Prerender-Url, which makes the service render an attacker-chosen URL on your token (open proxy / SSRF). Mirrors the CloudFlare worker fix.

Scope

Only the prerender-service branches change. The reverse-proxy branch that forwards to the customer's own LOVABLE_UPSTREAM is untouched.

🤖 Generated with Claude Code

Copying all inbound headers let a client inject Prerender control
headers (e.g. X-Prerender-Url), turning the integration into an open
proxy / SSRF on the account token. Mirror the CloudFlare worker fix:
forward only user-agent/accept/accept-language and set the trusted
X-Prerender-* headers. Applies to both the subscriber and
custom-domain workers.

Co-Authored-By: Claude Sonnet 5.5 <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.

1 participant