【发布时间】:2013-07-08 01:57:52
【问题描述】:
我正在尝试在 Sinatra 中使用此将所有 https 流量重定向到 http
get "*" do
if request.secure?
redirect request.url.gsub(/^https/, "http")
else
pass # continue execution
end
end
但是,在 heroku 上的自定义域上,我的浏览器显示错误:
This is probably not the site you are looking for!
You attempted to reach www.[domain].com, but instead you actually reached a server identifying itself as *.heroku.com.
我的 DNS 配置了 www 子域,其 CNAME 指向 [domain].herokuapp.com,根据 https://devcenter.heroku.com/articles/custom-domains
这是 DNS 问题吗?购买 SSL 证书是允许所有 https 流量在 heroku 上重定向到 http 的唯一方法吗?
【问题讨论】:
-
我可以试试:icelab.com.au/articles/…