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中发生.

我错过了什么?

解决方法

不幸的是,没有确凿的解决方案(但非常感谢Heroku的技术帮助).

通过回滚并再次尝试来管理以解决问题:

>将DNS转发回Godaddy
>从Cloudflare擦除域名
>确保Godaddy的功能
>在Cloudflare上创建域
>再次转移到Cloudflare

现在一切按计划进行.

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...