NodeJS & SSL – “bad password read”

This is because you’ve specified a passphrase when generating the cert. This is a password that must be supplied by anyone wanting to use it. Adding a passphrase field to the credentials solves the problem. var credentials = { key: fs.readFileSync(‘XXX.key’, ‘utf8’), cert: fs.readFileSync(‘XXX.crt’, ‘utf8’), passphrase: ‘XXXX’ } var httpsServer = https.createServer(credentials, app);

How to deploy an HTTPS-only site, with Django/nginx?

For the 2nd part of John C’s answer, and Django 1.4+… Instead of extending HttpResponseRedirect, you can change the request.scheme to https. Because Django is behind Nginx’s reverse proxy, it doesn’t know the original request was secure. In your Django settings, set the SECURE_PROXY_SSL_HEADER setting: SECURE_PROXY_SSL_HEADER = (‘HTTP_X_FORWARDED_PROTO’, ‘https’) Then, you need Nginx to set … Read more

Firefox redirects localhost to HTTPS

This happened to me after I worked on a site that used https and then tried switching back to one that does not. Unfortunately, the accepted answer did not work for me. What I needed to do was: Open the Firefox History (ctrl+h) Find the page (127.0.0.1:3000, in my case) Right-click it and choose the … Read more

Why use protocol-relative URLs at all?

As of December 2014, Paul Irish’s blog on protocol-relative URLs says: 2014.12.17: Now that SSL is encouraged for everyone and doesn’t have performance concerns, this technique is now an anti-pattern. If the asset you need is available on SSL, then always use the https:// asset. Unless you have specific performance concerns (such as the slow … Read more

HTTPS Proxy Server in node.js

Solutions barely exist for this, and the documentation is poor at best for supporting both on one server. The trick here is to understand that client proxy configurations may send https requests to an http proxy server. This is true for Firefox if you specify an HTTP proxy and then check “same for all protocols”. … Read more

Tomcat support for HTTP/2.0?

I’m the HTTP/2 implementer in Jetty, and I watch out other projects implementing HTTP/2. Tomcat’s Mark Thomas has outlined support for HTTP/2 for Tomcat 9. Update Jan 2017: Tomcat 8.5 supports HTTP/2 see @joe-aldrich answer https://stackoverflow.com/a/37889873/2027465 Considering that Servlet 4.0 is going to have as a target HTTP/2 support, and that HTTP/2 support requires ALPN … Read more