自动 SSL 或加速 SSL 不适用于 heroku

Automated SSL or expedited ssl not working on heroku

我在 Heroku 上有一个 DNS 映射到 godaddy 域的应用程序。我将 godaddy 设置为 CNAME www www.myapp.com.herokudns.com

所以如果我去 http://www.myapp.com 就可以了。

我正在尝试添加 ssl,以便我可以使用 https://www.myapp.com instead. I tried upgrading my app to hobby as shown here: https://blog.heroku.com/announcing-automated-certificate-management but it doesn't work. If I go to https://myapp.com 连接需要很长时间,然后出现错误:This site can't be reached .

我也尝试过在 heroku 上使用 expedited ssl,但这也没有用。我应该如何在我的应用程序上设置 SSL,以便可以通过 https

访问 godaddy 域

当我在 production.rb 中添加 config.force_ssl = true 时,该应用程序根本无法运行。

注意:myapp是原应用的占位符名称

所以。虽然我添加了自动证书管理,但我没有添加 SSL 证书。最后,弄清楚了,在 Heroku 上添加了 expeditedSSL 并再次重试。现在一切正常。

在 rails config/environments/production 中添加了 config.force_ssl = true