workers-sdk
workers-sdk copied to clipboard
🚀 Feature Request: Load dev https certificate and key from environment variables
Describe the solution
I use Tailscale for https during development and have a common certificate and key for all projects. It would be convenient to load these using environment variables like WRANGLER_HTTPS_{CERT|_KEY}_PATH.
We discussed this in https://github.com/cloudflare/workers-sdk/pull/4475#issuecomment-1835987149. It was decided, at that time, that it was more flexible to use a command line argument. But we could consider ENV vars too?? Would the CLI args approach be enough for you?
But we could consider ENV vars too?? Would the CLI args approach be enough for you?
Command line arguments works fine but environment variables would be far more convenient. Also with the latter you don't need to add args to the package.json script and potentiality break for other users who don't have the certificate and key. Maybe these options also can be added to the dev section in the wrangler config?
Hey @petebacondarwin was this feature mentioned in the docs?
I'm afraid not. In general we have not documented these types of env variable.
@lrapoport-cf - is this something we should do?