Skip to content

Delegate HTTPS handling to Miniflare#11449

Merged
penalosa merged 6 commits intomainfrom
penalosa/certs-in-miniflare
Nov 27, 2025
Merged

Delegate HTTPS handling to Miniflare#11449
penalosa merged 6 commits intomainfrom
penalosa/certs-in-miniflare

Conversation

@penalosa
Copy link
Contributor

@penalosa penalosa commented Nov 27, 2025

Previously, Wrangler generated self-signed certificates on the user's behalf when they requested a secure dev server but didn't provide custom certs. With this PR, we delegate through to Miniflare's implementation (using a shared cert), which cuts over 1MB from the Wrangler bundle by removing the certificate generation libraries.

I don't think this is a breaking change, since we already generate these certs on a 30 day interval and so they shouldn't be assumed to be stable.


  • Tests
    • Tests included
    • Tests not necessary because: covered by existing tests, but should also be manually tested
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: we don't document https handling
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: not a patch change

@penalosa penalosa requested a review from a team as a code owner November 27, 2025 15:10
@changeset-bot
Copy link

changeset-bot bot commented Nov 27, 2025

🦋 Changeset detected

Latest commit: 6e6db93

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

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


// [alt_names]
// DNS.0 = localhost
// IP.1 = 127.0.0.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the key change to the included cert

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Nov 27, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 27, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@11449

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@11449

miniflare

npm i https://pkg.pr.new/miniflare@11449

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@11449

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@11449

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@11449

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@11449

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@11449

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@11449

wrangler

npm i https://pkg.pr.new/wrangler@11449

commit: 6e6db93

@penalosa penalosa merged commit e7b690b into main Nov 27, 2025
35 of 38 checks passed
@penalosa penalosa deleted the penalosa/certs-in-miniflare branch November 27, 2025 17:43
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants