Open slukes opened 8 months ago
cc @anonrig
Please help with console.log(process.env)
for debugging purpose. Just to verify the env variable is set but the path specified is getting wrong while using --env-file
flag.
After I will write a reproducing snippets.
Doc says:
The NODE_EXTRA_CA_CERTS environment variable is only read when the Node.js process is first launched. Changing the value at runtime [..] has no effect on the current process.
for now, i think it not supported to set NODE_EXTRA_CA_CERTS
in env file, may need to note this on the document
Please help with
console.log(process.env)
for debugging purpose. Just to verify the env variable is set but the path specified is getting wrong while using--env-file
flag. After I will write a reproducing snippets.
I can confirm that the variable is getting correctly set 😄. (I can't share my whole process.env with you)
@slukes I checked the code, in the start process, it will use NODE_EXTRA_CA_CERTS
from process env to init openssl first, then load the file from --env-file
, so it will not work for setting NODE_EXTRA_CA_CERTS
in --env-file
, maybe you need to set it before you start node
@anonrig if it expects to work, I want to try to fix it
@anonrig if we can do anything to help please let me know!
Hi, just wanted to say that it would be amazing to be able to set this in .env
🥺
Version
v21.5.0
Platform
Darwin MACM-YXGQWMKDQK 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64
Subsystem
No response
What steps will reproduce the bug?
Run node --env-file ./config/.env.development
With env file containing NODE_EXTRA_CA_CERTS
The variable is not taken into account.
Run same script but exporting the variable first, it is correctly taken into account.
How often does it reproduce? Is there a required condition?
Always!
What is the expected behavior? Why is that the expected behavior?
The ca cert should be taken into account
What do you see instead?
It is not correctly taken into account and I get errors about self signed certificates
Additional information
No response