大佬教程收集整理的这篇文章主要介绍了ruby-on-rails – Cloudflare上的Heroku自定义域:重定向太多,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
>通过CloudFlare运行https://rapid.essbap.org.
>这应该映射到https://ebcc-rrn.herokuapp.com(Rails应用程序)
>但是,我得到“太多重定向”页面,例如
>之前在其他Heroku应用程序上成功完成此操作,使用以下步骤
>我错过了什么?
我做了什么
>通过Godaddy购买了essbap.org.
>导入DNS到CloudFlare.
>在Godaddy插入CloudFlare名称服务器.
>从Godaddy删除了区域记录.
CloudFlare的:
>快速插入CNAME记录指向ebcc-rrn.herokuapp.com
>在Heroku上:将自定义域名rapid.essbap.org添加到ebcc-rrn.herokuapp.com
Heroku的:
heroku domains:add rapid.essbap.org === ebcc-rrn Heroku Domain ebcc-rrn.herokuapp.com === ebcc-rrn Custom Domains Domain Name DNS Target ---------------- ---------------------- rapid.essbap.org ebcc-rrn.herokuapp.com $host rapid.essbap.org rapid.essbap.org has address 104.27.162.137 rapid.essbap.org has address 104.27.163.137
CloudFlare设置
刚刚添加:
跑步卷曲
当我对另一个我认识有效的Heroku自定义域应用程序运行curl时,它看起来像:
$curl -I some.custom_app.com http/1.1 301 Moved PeRMANently LOCATIOn: https://some.custom_app.com/ # since I'm using force_ssl on Rails,we expect to be directed to https:// $curl -I https://some.custom_app.com/ http/1.1 200 OK
ebcc-rrn.herokuapp.com的类似行为(Herokuapp我们希望rapid.essbap.org成为别名).一个301然后200.
但是当我对rapid.essbap.org进行curl时,我得到:
$curl -I rapid.essbap.org http/1.1 301 Moved PeRMANently LOCATIOn: https://rapid.essbap.org/ # since I'm using force_ssl on Rails,we expect to be directed to https:// $curl -I https://rapid.essbap.org http/1.1 301 Moved PeRMANently LOCATIOn: https://rapid.essbap.org/
在第二种情况下,我们得到301而不是200.我不确定为什么要生成301.不会在dev或ebcc-rrn.herokuapp.com中发生.
我错过了什么?
以上是大佬教程为你收集整理的ruby-on-rails – Cloudflare上的Heroku自定义域:重定向太多全部内容,希望文章能够帮你解决ruby-on-rails – Cloudflare上的Heroku自定义域:重定向太多所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。