On the OpenShift website: https://help.openshift.com/hc/en-us/articles/202535440-How-do-I-get-SSL-for-my-domains- , it points
You can always take advantage of our *.rhcloud.com wildcard certificate in order to securely connect to any application via it original, OpenShift-provided hostname URL.
However, the Node HTTPS server requires the path to the certificate and private key in order to use HTTPS:
var privateKey = fs.readFileSync('sslcert/server.key', 'utf8'); var certificate = fs.readFileSync('sslcert/server.crt', 'utf8'); var credentials = {key: privateKey, cert: certificate}; var express = require('express'); var app = express(); var httpsServer = https.createServer(credentials, app); httpsServer.listen(443);
None of the OpenShift environment variables ( https://www.openshift.com/developers/openshift-environment-variables ) are apparently related to SSL certificates, and the documentation doesnβt mention anything other than the link above, which is not contains technical information for its actual use.
How to access the private file and certificate file on the OpenShift Node.js device / cartridge?
source share