【问题标题】:Unknown SSL protocol error in connection with rails app on Heroku与 Heroku 上的 rails 应用程序相关的未知 SSL 协议错误
【发布时间】:2018-01-29 13:08:33
【问题描述】:

我升级了我在 Heroku 上的计划,以便能够使用 Heroku SSL,其中包括自动证书管理 (ACM)。

因此,当我运行 heroku certs:info 时,我得到:

Certificate details:
Common Name(s): www.myapp.fr
Expires At:     2018-04-29 10:10 UTC
Issuer:         /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
Starts At:      2018-01-29 10:10 UTC
Subject:        /CN=www.myapp.fr
SSL certificate is verified by a root authority.

heroku certs

Name                Common Name(s)    Expires               Trusted  Type
──────────────────  ────────────────  ────────────────────  ───────  ────
tyrannosaurs-12099  www.myapp.fr      2018-04-29 10:10 UTC  True     ACM

但是,我的应用程序仍然显示为不安全(没有 https),当我运行 curl -kvI https://www.myapp.fr 时,我得到的结果如下:

    [2.3.4]
* Rebuilt URL to: https://www.myapp.fr/
*   Trying 79.125.111.38...
* Connected to www.myapp.fr (79.125.111.38) port 443 (#0)
* Unknown SSL protocol error in connection to www.myapp.fr:-9838
* Closing connection 0
curl: (35) Unknown SSL protocol error in connection to www.myapp.fr:-9838

关于如何让我的 HTTPS 正常工作的任何想法?

【问题讨论】:

    标签: ruby-on-rails ssl curl heroku ruby-on-rails-5


    【解决方案1】:

    我想我当时解决了这个问题:为了强制所有客户端使用 https,您需要更新您的应用程序以检查此问题。在 Rails 中,这通常通过设置来完成

    config.force_ssl = trueconfig/environments/production.rb.

    然后等待几分钟,应该没问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-11-16
      • 2017-12-22
      • 2015-11-22
      • 2014-11-24
      • 2013-12-27
      • 1970-01-01
      • 2017-01-20
      相关资源
      最近更新 更多