I'm trying to use node-red as a frontend to interface with a REST API that I'm building. My API uses https but on my local server the certificates aren't perfectly set up and when I try to use a "http request" node I get a error:
UNABLE_TO_VERIFY_LEAF_SIGNATURE
Is there a way to configure node-red to be less strict and allow SSL protocol errors and proceed to process the http request? Did anyone create their own version of the "http request" node that is less strict than the default one?
(in the Google Chome browser I have a green padlock so SSL is nearly correct, node-red is being very picky)
To run node-red I use docker:
docker run -dp 1880:1880 -v ~/.node-red:/root/.node-red --name node-red cpswan/node-red
This is my node-red project sourcecode:
[{"id":"e246fcb9.1db9","type":"inject","name":"Trigger user/me","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":200,"y":140,"z":"e7bac913.184538","wires":[["f9d78108.06288"]]},{"id":"96b8b92c.694748","type":"http request","name":"user/me","method":"GET","ret":"obj","url":"https://local.supertasker.com/api/user/me","x":711,"y":141,"z":"e7bac913.184538","wires":[["5150419b.aeafc"]]},{"id":"5150419b.aeafc","type":"debug","name":"","active":true,"console":"false","complete":"false","x":906,"y":140,"z":"e7bac913.184538","wires":[]},{"id":"f9d78108.06288","type":"function","name":"Add 'Accept:application/json' header","func":"\nmsg.headers = {\n 'Accept':'application/json'\n};\n\n// Return the message so it can be sent on\nreturn msg;","outputs":1,"valid":true,"x":464,"y":140,"z":"e7bac913.184538","wires":[["96b8b92c.694748"]]}]
Add the following code in settings.js
file. Before the module.exports
line
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
If you want to find the file location run the node-red it, shows the file location as well.