【问题标题】:Rack ssl not working with Thin机架 ssl 不适用于 Thin
【发布时间】:2011-10-30 20:08:09
【问题描述】:

我按照以下说明为 Rails 3.07 安装了机架 ssl:http://www.simonecarletti.com/blog/2011/05/configuring-rails-3-https-ssl/

它不工作。发出第一个 https 请求(用于登录页面)并安全地提供该页面,但是当您登录时,它会重定向到非安全的 http URL。

我正在运行瘦服务器。它适用于薄吗? Webrick 呢?

有什么想法吗?谢谢。

【问题讨论】:

  • 你能检查HTTPS参数是否存在?

标签: ruby-on-rails ruby-on-rails-3 ssl https thin


【解决方案1】:

对于 Thin,您可以使用以下选项传递您的 SSL 信息:

$ thin --help

SSL options:
    --ssl                        Enables SSL
    --ssl-key-file PATH          Path to private key
    --ssl-cert-file PATH         Path to certificate
    --ssl-verify                 Enables SSL certificate verification

如果您想将 Webrick 配置为使用 SSL,this 来自this 问题的文章似乎可行。

【讨论】:

    猜你喜欢
    • 2016-10-17
    • 1970-01-01
    • 1970-01-01
    • 2020-08-23
    • 2011-10-01
    • 2014-11-25
    • 1970-01-01
    • 2015-09-30
    • 2011-11-15
    相关资源
    最近更新 更多