Heroku:SSL未启用 [英] Heroku: SSL is not enabled

查看:120
本文介绍了Heroku:SSL未启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我的Rails(3.2.1)应用程序在Heroku上运行良好。然后在我的生产配置文件中设置 config.force_ssl = true ,打开文件后,我现在得到了SSL未启用错误。我认为Heroku允许你搭载他们的SSL证书,但它不适合我。



使用
$ b


  • heroku addons:添加piggyback_ssl (失败,因为附加组件现在是标准..)

  • 验证我的帐户(不应该是必需的,但我试过了无论如何)

  • 更改我的 config.force_ssl = false ,但我的应用程序仍尝试使用SSL ...


解决方案

我可能会迟一点,但即使您有浏览器仍然会将您重定向到https Rails中关闭的选项与严格传输安全标题(HSTS)有关。
以下是信息(德文版,自动翻译)。


So my Rails (3.2.1) app was working fine on Heroku. Then I set config.force_ssl = true in my production config file, upon opening the file, I now got the "SSL is not enabled" error. I thought Heroku allows you to piggyback their SSL certs, but it is not working for me.

What I've tried:

  • using heroku addons:add piggyback_ssl (fails, as the add-on is now standard..)
  • validating my account (shouldn't be necessary, but I tried it anyway)
  • changing my config.force_ssl = false, but my app still tries to use SSL...

解决方案

I may a bit late, but the reason that your browser still redirects you to https even if you have that option turned off in Rails has to do with the "Strict-Transport-Security" header (HSTS). Here is a post (in German, with automatic translation here) on that topic.

这篇关于Heroku:SSL未启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆