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

Merged
merged 4 commits into from
Jan 13, 2025

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: 9f87e81

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/12746533122/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/12746533122/npm-package-wrangler-7630 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12746533122/npm-package-cloudflare-workers-bindings-extension-7630 -O ./cloudflare-workers-bindings-extension.0.0.0-v22035ad3e.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v22035ad3e.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12746533122/npm-package-create-cloudflare-7630 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12746533122/npm-package-cloudflare-kv-asset-handler-7630

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12746533122/npm-package-miniflare-7630

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12746533122/npm-package-cloudflare-pages-shared-7630

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12746533122/npm-package-cloudflare-unenv-preset-7630

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12746533122/npm-package-cloudflare-vitest-pool-workers-7630

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12746533122/npm-package-cloudflare-workers-editor-shared-7630

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12746533122/npm-package-cloudflare-workers-shared-7630

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12746533122/npm-package-cloudflare-workflows-shared-7630

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


wrangler@3.101.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20241230.1
workerd 1.20241230.0 1.20241230.0
workerd --version 1.20241230.0 2024-12-30

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
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1449-fix-options-request branch from c223f8f to 2f60c2e Compare January 10, 2025 22:23
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1449-fix-options-request branch from 2f60c2e to 9f87e81 Compare January 13, 2025 11:46
@edmundhung edmundhung merged commit b687dff into main Jan 13, 2025
31 checks passed
@edmundhung edmundhung deleted the edmundhung/DEVX-1449-fix-options-request branch January 13, 2025 13:19
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: Done
Development

Successfully merging this pull request may close these issues.

2 participants