Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在使用
Express 2.x
Node 0.8.x
我必须通过吗
key和certexpress.createServer() 的参数以通过 Node.js 处理 SSL?
key
cert
还是 SSL 由 Heroku 上的 Nginx 处理?
不,SSL 终止发生在负载均衡器上,在加密流量到达您的节点应用程序之前:
browser <--HTTPS--> nginx <--HTTP--> node
您可以查看req.headers['x-forwarded-proto'] === 'https'请求来自哪个协议。
req.headers['x-forwarded-proto'] === 'https'
相关:在heroku中配置jetty ssl