PhantomJS failing to open HTTPS site

I tried Fred’s and Cameron Tinker’s answers, but only –ssl-protocol=any option seem to help me: phantomjs –ssl-protocol=any test.js Also I think it should be way safer to use –ssl-protocol=any as you still are using encryption, but –ignore-ssl-errors=true will ignore (duh) all ssl errors, including malicious ones.

How do I make a https post in Node Js without any third party module?

For example, like this: const https = require(‘https’); var postData = JSON.stringify({ ‘msg’ : ‘Hello World!’ }); var options = { hostname: ‘posttestserver.com’, port: 443, path: ‘/post.php’, method: ‘POST’, headers: { ‘Content-Type’: ‘application/x-www-form-urlencoded’, ‘Content-Length’: postData.length } }; var req = https.request(options, (res) => { console.log(‘statusCode:’, res.statusCode); console.log(‘headers:’, res.headers); res.on(‘data’, (d) => { process.stdout.write(d); }); }); … Read more

Can you use a service worker with a self-signed certificate?

As an alternative to using self-signed certificates, you can launch Chrome or Firefox such that it pretends certain domains are secure. For example, using Chrome on a Mac, you can launch it using: /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ –user-data-dir=/tmp/foo –unsafely-treat-insecure-origin-as-secure=http://www.your.site Service workers should then work from http://www.your.site. More info can be found here: Options for testing … Read more

nodejs – error self signed certificate in certificate chain

Option 1: Disable the warning (useful for dev) From your question I’m guessing you are doing this in development as you are using a self signed certificate for SSL communication. If that’s the case, add as an environment variable wherever you are running node export NODE_TLS_REJECT_UNAUTHORIZED=’0′ node app.js or running node directly with NODE_TLS_REJECT_UNAUTHORIZED=’0′ node … Read more