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

fix(playground-preview-worker,edge-preview-authenticated-proxy): allow overriding raw request method with the X-CF-Http-Method header #7630

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

edmundhung
Copy link
Member

@edmundhung edmundhung commented Dec 24, 2024

Fixes DEVX-1449.

This is the first part of the fixes. It introduces the X-CF-Http-Method header that lets our proxy know which HTTP request method the users is sending. This will be utilized by the playground and quick editor in a separate PR to address an issue where OPTIONS raw http request is not handled properly. This change is backward compatible so it should be landed first before we update the implementation on the playground (#7639) and quick editor.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bugfix

Copy link

changeset-bot bot commented Dec 24, 2024

🦋 Changeset detected

Latest commit: 7a1cc48

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 Patch
playground-preview-worker 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

@edmundhung edmundhung added preview:workers-playground Trigger a workers playground preview deploy preview:quick-edit Trigger a quick edit preview deploy labels Dec 24, 2024
Copy link
Contributor

github-actions bot commented Dec 24, 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/12516528789/npm-package-wrangler-7630

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-wrangler-7630 dev path/to/script.js
Additional artifacts:
wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-cloudflare-workers-bindings-extension-7630 -O ./cloudflare-workers-bindings-extension.0.0.0-v38c38bffc.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v38c38bffc.vsix
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-create-cloudflare-7630 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-cloudflare-kv-asset-handler-7630
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-miniflare-7630
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-cloudflare-pages-shared-7630
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-cloudflare-unenv-preset-7630
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-cloudflare-vitest-pool-workers-7630
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-cloudflare-workers-editor-shared-7630
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-cloudflare-workers-shared-7630
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12516528789/npm-package-cloudflare-workflows-shared-7630

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


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20241218.0
workerd 1.20241218.0 1.20241218.0
workerd --version 1.20241218.0 2024-12-18

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

@edmundhung edmundhung force-pushed the edmundhung/DEVX-1449-fix-options-request branch 2 times, most recently from 184d121 to e125497 Compare December 27, 2024 12:20
@edmundhung edmundhung changed the title fix(playground,quick-editor): send raw request method through custom header instead of request method fix(playground-preview-worker,edge-preview-authenticated-proxy): allow overriding raw request method with the X-CF-Http-Method header Dec 27, 2024
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1449-fix-options-request branch from b509e2b to 7a1cc48 Compare December 27, 2024 13:15
@edmundhung edmundhung added the e2e Run e2e tests on a PR label Dec 27, 2024
@edmundhung edmundhung marked this pull request as ready for review December 27, 2024 13:17
@edmundhung edmundhung requested a review from a team as a code owner December 27, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e tests on a PR preview:quick-edit Trigger a quick edit preview deploy preview:workers-playground Trigger a workers playground preview deploy
Projects
Status: Untriaged
Development

Successfully merging this pull request may close these issues.

1 participant