Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally strip cf-ew-raw prefix #6458

Merged
merged 3 commits into from
Aug 19, 2024
Merged

Optionally strip cf-ew-raw prefix #6458

merged 3 commits into from
Aug 19, 2024

Conversation

penalosa
Copy link
Contributor

@penalosa penalosa commented Aug 9, 2024

What this PR solves / how to test

Part of https://jira.cfdata.org/browse/DEVX-1312

When sending raw HTTP requests to the playground & quick edit, we'd previously been passing along the headers that the user specified directly in the request to the proxy. This meant that some headers were instead being interpreted by the browser/proxy rather than being passed along to the user-worker (e.g. Accept). This change supports optionally prefixing headers with cf-ew-raw-, which will be stripped before being passed to the user worker. Followup PRs will add this prefixing to the playground & quick edit UI to take advantage.

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Included
    • Not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required / Maybe required
    • Not required because: Doesn't touch Wrangler code
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Included
    • Not necessary because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Not necessary because: Not currently documented

@penalosa penalosa requested a review from a team as a code owner August 9, 2024 13:53
Copy link

changeset-bot bot commented Aug 9, 2024

🦋 Changeset detected

Latest commit: 0c50859

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

This PR includes changesets to release 2 packages
Name Type
edge-preview-authenticated-proxy Minor
playground-preview-worker Minor

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

@penalosa penalosa added the playground-worker Bug or feature on the CF Workers Playground Worker label Aug 9, 2024
Copy link
Contributor

github-actions bot commented Aug 9, 2024

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10320454789/npm-package-wrangler-6458

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6458/npm-package-wrangler-6458

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10320454789/npm-package-wrangler-6458 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10320454789/npm-package-create-cloudflare-6458 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10320454789/npm-package-cloudflare-kv-asset-handler-6458
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10320454789/npm-package-miniflare-6458
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10320454789/npm-package-cloudflare-pages-shared-6458
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10320454789/npm-package-cloudflare-vitest-pool-workers-6458
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10320454789/npm-package-cloudflare-workers-shared-6458

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.70.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240806.0
workerd 1.20240806.0 1.20240806.0
workerd --version 1.20240806.0 2024-08-06

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@penalosa penalosa merged commit 50a60a6 into main Aug 19, 2024
18 checks passed
@penalosa penalosa deleted the penalosa/header-prefixing branch August 19, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
playground-worker Bug or feature on the CF Workers Playground Worker
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants