Conversation
🦋 Changeset detectedLatest commit: 555548b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Waiting on miniflare release before PR can be merged |
mrbbot
left a comment
There was a problem hiding this comment.
I don't think we want to add new local-key/local-cert flags for this. We should be very careful about adding new flags, especially those that are local specific.
Instead, Wrangler actually already includes that selfsigned package we talked about for use in remote mode. 🙂 See https://github.com/cloudflare/workers-sdk/blob/8d1521e9ce77136f6da6a1313748e597b3622f8b/packages/wrangler/src/https-options.ts and:
workers-sdk/packages/wrangler/src/proxy.ts
Lines 569 to 572 in 8d1521e
We should be able to call this same function in local mode somewhere around here:
workers-sdk/packages/wrangler/src/dev/miniflare.ts
Lines 374 to 378 in 8d1521e
27ddd3e to
2143d1f
Compare
|
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/5417071771/npm-package-wrangler-3529You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/3529/npm-package-wrangler-3529Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5417071771/npm-package-wrangler-3529 dev path/to/script.jsAdditional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5417071771/npm-package-cloudflare-pages-shared-3529Note that these links will no longer work once the GitHub Actions artifact expires. |
Codecov Report
@@ Coverage Diff @@
## main #3529 +/- ##
==========================================
- Coverage 75.09% 75.09% -0.01%
==========================================
Files 190 190
Lines 11108 11110 +2
Branches 2919 2919
==========================================
+ Hits 8342 8343 +1
- Misses 2766 2767 +1
|
2143d1f to
e539092
Compare
e539092 to
555548b
Compare
@mrbbot / @jspspike The 'selfsigned' package generates a cert, but that cert is not trusted by the system browser as it isn't added to the system keychain etc., and it is a real pain to have to regularly accept the 'here be dragons' warnings or add the freshly updated certs to the appropriate keychains. For Wrangler 2 I had to hack around and overwrite the wrangler generated cert my my own trusted one (generated by mkcert fwiw). This is definitely a hack. Most other systems allow the cert files to be specified, either via a command line option or environment var. So, I'd request that an option of some sort is provided to override the wrangler/miniflare generated cert. |
Fixes #3353.
PR adds support for https in local mode for dev. Adds new options to provide custom key and cert for https server.
Docs issue
Author has included the following, where applicable:
Reviewer is to perform the following, as applicable: