使用SSL和CloudFlare将Phoenix应用程序部署到Heroku“太多重定向” [英] Deploying Phoenix Application to Heroku with SSL and CloudFlare "too many redirects"
问题描述
域名是 。使任何人尝试使用 www 版本重定向到非www 版本。
所有值得注意的是我使用的是https和SSL,一切都已经在Heroku上正确配置。
对于一些奇怪的原因,我继续收到一个太多的重定向错误,尽管一切似乎正确设置。
我有同样的问题。请按照以下步骤操作:
- 在页面规则下,删除或禁用任何可能
的转发规则 - 如果您在Heroku上使用SSL,请确保您的cloudflare dns设置正在DNS下的cloud中使用.herokudns.com
- 列,确保您的云层是灰色而不是橙色。 (你想只使用
cloudflare DNS,而不是DNS +代理
Just recently deployed an Phoenix Application that runs just fine on the localhost.
The domain name is something.ai and I would like to make anyone trying to use the www version to be redirected to the non-www version.
All the DNS is being managed on CloudFlare's free plan.
Worth noting that I'm using https and SSL, everything has been properly configured on Heroku.
For some weird reason I keep getting a "too many redirects" error, although everything seems to be properly set.
I was having exactly the same problem. Follow these steps:
- under "Page Rules", remove or disable any forwarding rules you might have
- if you're using SSL on Heroku, make sure that your cloudflare dns settings are using .herokudns.com
- in cloudflare under "DNS", under the "status" column, make sure your clouds are gray and not orange. (you want to only use the cloudflare DNS, not DNS + proxy
这篇关于使用SSL和CloudFlare将Phoenix应用程序部署到Heroku“太多重定向”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!