我有一个应用程序在Heroku上运行.js在 node 上.js和https
.如何识别协议以强制重定向到https
with Node.希罗库的js?
我的应用只是一个简单的http
服务器,它(还)没有意识到Heroku正在向它发送https
个请求:
// Heroku provides the port they want you on in this environment variable (hint: it's not 80)
app.listen(process.env.PORT || 3000);