Rails 3 SSL Deprecation

后端 未结 4 863
感动是毒
感动是毒 2020-11-27 10:13

I am upgrading an application to Rails 3.0.0 and am wondering if the standard method for adding SSL has changed (I vaguely remember demos indicating the router could now han

4条回答
  •  我在风中等你
    2020-11-27 10:50

    In later Rails (at least 3.12+) you can use the following, environment-specific:

    in config/environments/production.rb (or other environment)

    # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
    config.force_ssl = true
    

提交回复
热议问题