【问题标题】:How Heroku is turning my http express server into the https server?Heroku 如何将我的 http express 服务器变成 https 服务器?
【发布时间】:2021-11-02 09:21:48
【问题描述】:

问题

我用app.listen做了一个快递服务器如下:

app.listen(config.PORT, _ => { console.log(`Server started at port # ${config.PORT}`)})

我将它部署在 Heroku 上。

现在它正在使用 https。签出:https://dnt-ecommerce.herokuapp.com/

我在浏览器开发工具中检查了请求,它仍然是 https

问题

我的 http express 服务器怎么会在前端处理 https 请求?

GitHub 代表 https://github.com/siddiqian/dntstores-ecommerce

【问题讨论】:

    标签: node.js express http heroku https


    【解决方案1】:

    https://devcenter.heroku.com/changelog-items/1815

    正如它所说.... https 可以在 .heroku.com 上运行,即使我们配置了自定义域。所以它是一个默认功能(感谢 heroku)。当我们在自定义域上配置 SSL 并手动上传您自己的证书时,HTTPS 将停止在 .herokuapp.com 上工作。

    【讨论】:

      猜你喜欢
      • 2011-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-09
      • 2011-12-04
      相关资源
      最近更新 更多