Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

v3 backport of #10938

This PR backports the fix for remote dev with Cloudflare Access to the v3-maintenance branch.

What changed

When using wrangler dev --remote with Cloudflare Access enabled on the preview service, the exchange API request was not including the Access token, causing authentication failures.

This fix acquires the Cloudflare Access token for the exchange URL hostname and includes it as a CF_Authorization cookie header in the fetch request. This mirrors the same Access token handling already present in the createWorkerPreview function for the prewarm request.

Review checklist

  • Verify Access token is acquired for the correct hostname (switchedExchangeUrl.hostname)
  • Confirm cookie header format is correct: CF_Authorization=${accessToken}
  • Verify this doesn't break remote dev for users without Access (should be handled by the if (accessToken) check)
  • Confirm this is an appropriate v3 backport (bug fix, not new feature)

  • Tests
  • Wrangler E2E Tests CI Job required?
    • Required
  • Public documentation
    • Documentation not necessary because: Bug fix that restores expected functionality

Link to Devin run: https://app.devin.ai/sessions/83395ce9848b417e892a334e552f0d6f
Requested by: @smacleod

Note: This PR should not be merged until the original PR #10938 is merged first (enforced by CI).

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot
Copy link

changeset-bot bot commented Oct 13, 2025

🦋 Changeset detected

Latest commit: 33b24f0

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

This PR includes changesets to release 1 package
Name Type
wrangler Patch

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 Oct 13, 2025
@devin-ai-integration devin-ai-integration bot added the v3-backport The PR is a v3 backport targetting the v3-maintenance branch label Oct 13, 2025
@devin-ai-integration devin-ai-integration bot mentioned this pull request Oct 13, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3-backport The PR is a v3 backport targetting the v3-maintenance branch

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

1 participant