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(workers-playground): sends raw request method through the X-CF-HTTP-Method header #7639

Merged

Conversation

edmundhung
Copy link
Member

@edmundhung edmundhung commented Dec 27, 2024

Fixes DEVX-1449.

This PR utilizes the X-CF-HTTP-Method header introduced on #7630 and is blocked until the relevant change is released (Update: released).

This change is already verified on the preview environment following these steps:

  1. Create a worker in the playground with the following code (Or use this link)
export default {
	async fetch(request, env, ctx) {
		return new Response(`Method: ${request.method}`);
	},
};
  1. Make some raw http requests using the form on the HTTP tab
  2. Verify if the OPTIONS request is handled correctly

Copy link

changeset-bot bot commented Dec 27, 2024

🦋 Changeset detected

Latest commit: 09fd1d6

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

This PR includes changesets to release 1 package
Name Type
workers-playground 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 the preview:workers-playground Trigger a workers playground preview deploy label Dec 27, 2024
Copy link
Contributor

github-actions bot commented Dec 27, 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/12789985194/npm-package-wrangler-7639

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12789985194/npm-package-wrangler-7639 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

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

create-cloudflare:

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

@cloudflare/kv-asset-handler:

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

miniflare:

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

@cloudflare/pages-shared:

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

@cloudflare/unenv-preset:

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

@cloudflare/vitest-pool-workers:

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

@cloudflare/workers-editor-shared:

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

@cloudflare/workers-shared:

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

@cloudflare/workflows-shared:

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

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.20241230.2
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-playground-raw-request-method-update branch from 7db261e to 09fd1d6 Compare January 15, 2025 14:04
@edmundhung edmundhung marked this pull request as ready for review January 15, 2025 14:04
@edmundhung edmundhung requested a review from a team as a code owner January 15, 2025 14:04
@edmundhung
Copy link
Member Author

Thanks for the review, @andyjessop!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview:workers-playground Trigger a workers playground preview deploy
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants