【问题标题】:Why is application running on Heroku not secured by Heroku SSL为什么在 Heroku 上运行的应用程序不受 Heroku SSL 保护
【发布时间】:2017-02-16 21:29:04
【问题描述】:

http://sambaza.herokuapp.com/: 我的应用程序本应受 Heroku 子域 SSL 保护,但不安全且缺少 SSL 证书,这是为什么呢?

【问题讨论】:

    标签: ruby-on-rails ssl heroku


    【解决方案1】:

    对于您使用的任何环境,您可能需要在您的production.rbstaging.rb 中设置config.force_ssl = true。您会注意到https://sambaza.herokuapp.com/ 确实使用默认证书呈现您的页面,它只是没有强制在您的设置中使用。

    查看heroku页面了解更多信息:https://devcenter.heroku.com/articles/ssl-endpoint

    【讨论】:

    • 谢谢你,我才意识到,然后来这里澄清它,真是一个疏忽。
    【解决方案2】:

    我必须启用它

    强制通过 SSL 对应用进行所有访问,使用 Strict-Transport-Security,并使用安全 cookie。

    config.force_ssl = true 在配置 production.rb 文件中

    【讨论】:

      猜你喜欢
      • 2021-11-18
      • 2021-09-26
      • 2015-01-05
      • 1970-01-01
      • 2013-08-08
      • 2012-05-18
      • 1970-01-01
      • 1970-01-01
      • 2011-11-04
      相关资源
      最近更新 更多