I am making an app for my own use, when I try to post JSON to my PHP server at example.com, I get the following error:
Uncaught Error: self signed certificate error
I tried the following code and it works:
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0
but I believe this approach is dangerous. What is the safe way to solve this error? I tried googling but did not find anything useful or maybe because I am a beginner I did not understand it.