Closed mschnee closed 2 years ago
nice, two questions:
fs.readFile
instead of readFileSync
?I'll look into readFileSync ->readFile with a clean head in the morning: I was essentially copying some of node-gyp's code over as-is. Apologies for taking the lazy approach ;)
As for the test: yes, it can be tested by setting up a small local server and ensuring both sides behave. Again, node-gyp to the rescue (https://github.com/nodejs/node-gyp/commit/8c4b0ffa503aa385f4186e028542dcedca2efeee)
I will create the test.
@maxogden Any chance that this will be merged as is when the conflicts get solved? We really need this.
Closing as abandoned :(
If you are behind a corporate firewall with a self-signed certificate, the correct way to configure node and npm is to use
npm config set cafile="/path/to/cert.pem"
This PR honors this configuration being passed to the request library in the same manner that node-gyp does (using the same readCAFile function, to boot)