应用程序运行Ruby 2.2.2,Rails 4.2.1
当我在本地运行我的应用程序时,一切都很好。它在heroku上运行正常,直到我做了一些更新。现在,我在浏览器中获得的内容是来自Chrome的“错误太多重定向”或Safari中的“太多重定向...”。即使我在heroku上回滚了版本并重置了数据库,我仍然会得到这个。我也删除了两个浏览器上的cookie和缓存。仍然是错误。
我在heroku日志中得到了一堆接一个:
2015-06-14T15:09:23.160000+00:00 heroku[router]: at=info method=GET path="/" host=www.domain.com request_id=28455761-bc94-4a27-852f-249f5409a4f2 fwd="50.152.172.74,199.27.128.248" dyno=web.1 connect=1ms service=1ms status=301 bytes=157
其中之一:
2015-06-14T16:11:18.084247+00:00 heroku[router]: at=info method=POST path="/payola/events" host=www.domain.com request_id=2ab49dd7-0392-4261-ae1e-1279998e37e1 fwd="54.241.34.107,199.27.133.164" dyno=web.1 connect=0ms service=1ms status=301 bytes=170
然后关闭之前: 2015-06-14T16:39:40.305372 + 00:00 heroku [router]:at = info method = GET path =“/”host = www.domain.com request_id = a54f6089-ca85-428f-ac01-0c02421a83da fwd =“ 50.152.172.74,199.27.128.73“dyno = web.1 connect = 1ms service = 1ms status = 301 bytes = 157
2015-06-14T16:39:40.498317+00:00 heroku[router]: at=info method=GET path="/" host=www.domain.com request_id=1f0aa9d4-7ae1-4141-ab32-7103aa0c1ef5 fwd="50.152.172.74,199.27.128.73" dyno=web.1 connect=0ms service=1ms status=301 bytes=157
2015-06-14T16:51:40.945338+00:00 heroku[router]: at=info method=GET path="/robots.txt" host=www.domain.com request_id=6a37a7d4-3277-4f55-9321-bdab79a744ff fwd="68.180.228.91,108.162.246.80" dyno=web.1 connect=3ms service=4ms status=301 bytes=167
2015-06-14T16:51:41.287899+00:00 heroku[router]: at=info method=GET path="/pricing" host=www.domain.com request_id=433b98e3-d445-47f3-b9b3-212dff1dfb57 fwd="68.180.228.91,108.162.246.226" dyno=web.1 connect=2ms service=8ms status=301 bytes=164
2015-06-14T16:56:30.228037+00:00 heroku[router]: at=info method=POST path="/payola/events" host=www.domain.com request_id=9de5611a-4cc4-474e-a4cf-26dfd1de31b3 fwd="54.241.34.107,199.27.133.114" dyno=web.1 connect=6ms service=2ms status=301 bytes=170
2015-06-14T17:58:38.217217+00:00 heroku[router]: at=info method=POST path="/payola/events" host=www.domain.com request_id=48a6417f-69f4-4ed2-b468-bf0edfae0c90 fwd="54.241.34.107,199.27.133.189" dyno=web.1 connect=0ms service=1ms status=301 bytes=170
2015-06-14T18:32:20.867295+00:00 heroku[router]: at=info method=POST path="/payola/events" host=www.domain.com request_id=276fc89e-3e07-441b-ad00-f2b60c77e540 fwd="54.241.34.107,199.27.133.189" dyno=web.1 connect=0ms service=1ms status=301 bytes=170
2015-06-14T19:05:57.170756+00:00 heroku[router]: at=info method=GET path="/robots.txt" host=www.domain.com request_id=22174ed2-db0a-45bb-b9d7-0a6f2ba2ac8c fwd="208.115.113.85,108.162.246.205" dyno=web.1 connect=4ms service=15ms status=301 bytes=167
2015-06-14T19:44:10.474487+00:00 heroku[router]: at=info method=POST path="/payola/events" host=www.domain.com request_id=bb575e60-1017-41c7-869e-31c0f3ec2528 fwd="54.241.34.107,199.27.133.164" dyno=web.1 connect=1ms service=2ms status=301 bytes=170
2015-06-14T20:46:06.583978+00:00 heroku[router]: at=info method=POST path="/payola/events" host=www.domain.com request_id=c348fef6-6ada-4825-a9ca-3631840d8e51 fwd="54.241.31.99,199.27.133.53" dyno=web.1 connect=8ms service=5ms status=301 bytes=170
有谁知道造成这种情况的原因是什么?
答案 0 :(得分:2)
我发现了答案。我在Cloudflare的网络上。事实证明,如果他们的"加密"如果SSL设置为"灵活的"那么你将得到重定向循环错误。不得不把它设置为" Full"。