workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

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

Open kansson opened this issue 1 year ago • 2 comments

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.

kansson avatar Jun 07 '24 20:06 kansson

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?

petebacondarwin avatar Jun 10 '24 14:06 petebacondarwin

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?

kansson avatar Jun 10 '24 19:06 kansson

Hey @petebacondarwin was this feature mentioned in the docs?

kansson avatar Dec 03 '24 17:12 kansson

I'm afraid not. In general we have not documented these types of env variable.

@lrapoport-cf - is this something we should do?

petebacondarwin avatar Dec 18 '24 08:12 petebacondarwin