Skip to content

Support setting custom HTTPS certification paths from environment variables#6479

Merged
petebacondarwin merged 3 commits intomainfrom
https-cert-from-env-issue-5997
Aug 14, 2024
Merged

Support setting custom HTTPS certification paths from environment variables#6479
petebacondarwin merged 3 commits intomainfrom
https-cert-from-env-issue-5997

Conversation

@petebacondarwin
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin commented Aug 13, 2024

What this PR solves / how to test

(Note that there are two auxiliary commits in this PR, which can be reviewed independently.)

Fixes #5997

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Included
    • Not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required / Maybe required
    • Not required because: is not tested in e2e tests
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Included
    • Not necessary because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Not necessary because: environment variables like this are not generally documented.

…nment variables

As well as providing paths to custom HTTPS certificate files, it is now possible to use WRANGLER_HTTPS_KEY_PATH and WRANGLER_HTTPS_CERT_PATH environment variables.

Specifying the file paths at the command line overrides specifying in environment variables.

Fixes #5997
…n Wrangler tests

This helper from Vitest will automatically revert to the original process.env values after each test.
@petebacondarwin petebacondarwin requested review from a team as code owners August 13, 2024 10:50
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 13, 2024

🦋 Changeset detected

Latest commit: 4ef97ed

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

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@cloudflare/vitest-pool-workers 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

@github-actions
Copy link
Copy Markdown
Contributor

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/10368361203/npm-package-wrangler-6479

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-wrangler-6479 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-create-cloudflare-6479 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-cloudflare-kv-asset-handler-6479
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-miniflare-6479
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-cloudflare-pages-shared-6479
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-cloudflare-vitest-pool-workers-6479
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-cloudflare-workers-editor-shared-6479
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-cloudflare-workers-shared-6479

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


wrangler@3.70.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240806.0
workerd 1.20240806.0 1.20240806.0
workerd --version 1.20240806.0 2024-08-06

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

@petebacondarwin petebacondarwin added the e2e Run wrangler + vite-plugin e2e tests on a PR label Aug 13, 2024
Copy link
Copy Markdown
Contributor

@CarmenPopoviciu CarmenPopoviciu left a comment

Choose a reason for hiding this comment

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

really nice one Pete! Thank you for working on this <3

@petebacondarwin petebacondarwin merged commit 3c24d84 into main Aug 14, 2024
@petebacondarwin petebacondarwin deleted the https-cert-from-env-issue-5997 branch August 14, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run wrangler + vite-plugin e2e tests on a PR

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

🚀 Feature Request: Load dev https certificate and key from environment variables

2 participants