I'm currently using
Express 2.x
Node 0.8.x
Do I have to pass
key
and cert
parameters to express.createServer() to handle SSL by Node.js?
Or SSL is handled by Nginx on Heroku?
I'm currently using
Express 2.x
Node 0.8.x
Do I have to pass
key
and cert
parameters to express.createServer() to handle SSL by Node.js?
Or SSL is handled by Nginx on Heroku?
Nope, SSL termination happens at the load balancer, before encrypted traffic reaches your node app:
browser <--HTTPS--> nginx <--HTTP--> node
You can check req.headers['x-forwarded-proto'] === 'https'
to see which protocol the request came in with.
Related: configure jetty ssl in heroku