【发布时间】:2015-08-11 09:29:17
【问题描述】:
我在 Heroku 上有一个使用 Expedited SSL 的 Rails 应用程序(以防万一)。
现在我可以从 example.com 永久转发到 https://www.example.com。偶尔,我只在 Chrome 上注意到它,当我请求页面 http://example.com 时,我收到一个 ERR_INSECURE_RESPONSE 错误页面,然后几秒钟后,它会将我带到 https://www.example.com 页面并正常加载。
我在控制台中运行了检查器以查看 http 不安全警告,但什么也没有。我尝试了几次卷曲,有一次出现错误。
Bashar:example bashar$ curl -v http://example.com
* Rebuilt URL to: http://example.com/
* Hostname was NOT found in DNS cache
* Trying xx.xx.xx.xx...
* Connected to example.com (xx.xx.xx.xx) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.37.0
> Host: example.com
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
Bashar:example bashar$ curl -v http://example.com
* Rebuilt URL to: http://example.com/
* Hostname was NOT found in DNS cache
* Trying xx.xx.xx.xx...
* Connected to example.com (xx.xx.xx.xx) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.37.0
> Host: example.com
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Cache-Control: max-age=900
< Content-Type: text/html
< Location: https://www.example.com
* Server Microsoft-IIS/7.5 is not blacklisted
< Server: Microsoft-IIS/7.5
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< Date: Tue, 11 Aug 2015 09:15:46 GMT
< Content-Length: 0
< Age: 1
< Connection: keep-alive
<
* Connection #0 to host example.com left intact
我已经阅读了有关该主题的多个讨论,但没有找到与此完全相同的讨论。有什么想法吗?
【问题讨论】:
标签: ruby-on-rails ssl heroku