Skip to content

Conversation

@petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Jan 26, 2026

When Quick Edit is accessed through a proxy (e.g., on devprod.cloudflare.dev), the browser sees the proxy's host, but the Worker receives its own host in the URL. The additionalBuiltinExtensions config tells VS Code where to load extensions from, so we need to use the proxy's host for the browser to load them correctly.

This change:

  • Reads the X-Forwarded-Host header from incoming requests
  • Validates it matches *.devprod.cloudflare.dev for security
  • Uses it as the authority for extension URLs when valid, falling back to url.host otherwise

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: This is a small, self-contained change that only affects the authority used for extension loading when behind a validated proxy
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: This is an internal implementation detail for proxy support

Open with Devin

@petebacondarwin petebacondarwin requested a review from a team as a code owner January 26, 2026 17:46
@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2026

🦋 Changeset detected

Latest commit: 87685a8

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Jan 26, 2026
@petebacondarwin petebacondarwin added the preview:quick-edit Trigger a quick edit preview deploy label Jan 26, 2026
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional flags.

Open in Devin Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 26, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12154

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12154

miniflare

npm i https://pkg.pr.new/miniflare@12154

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12154

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12154

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12154

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12154

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12154

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12154

wrangler

npm i https://pkg.pr.new/wrangler@12154

commit: 87685a8

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jan 27, 2026
@petebacondarwin petebacondarwin force-pushed the quick-edit-x-forwarded-host branch from 21e1bd8 to 87685a8 Compare January 27, 2026 13:32
@petebacondarwin petebacondarwin merged commit e36c0c9 into main Jan 27, 2026
37 of 38 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jan 27, 2026
@petebacondarwin petebacondarwin deleted the quick-edit-x-forwarded-host branch January 27, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:quick-edit Trigger a quick edit preview deploy

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants