简体   繁体   中英

Rails4: How to use HTTP instead of HTTPS (SSL) in production

I use a hosting service (not heroku) for Rails4 app.

I can piggyback on the hosting service's SSL certificate for an application running on a hosting service domain like Heroku.

The browser comes to show warning message after using a custom domain, such as www.example.com.

When I type www.example.com, redirect to https ://www.example.com (SSL).

Please advise me on how to use http ://www.example.com instead of https ://www.example.com (SSL).

I don't want to purchase and configure an SSL certificate for my domain so far.

I commented out config.force_ssl = true in production.rb.

config\\production.rb

SampleApp::Application.configure do
  #config.force_ssl = true
  config.serve_static_assets = true
end

尝试使用“ false”而不是注释掉:

config.force_ssl = false

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM