0
我對Rails4應用程序使用託管服務(而非heroku)。Rails4:如何在生產中使用HTTP而不是HTTPS(SSL)
我可以搭載託管服務的SSL證書,以運行在Heroku等託管服務域上的應用程序。
瀏覽器在使用自定義域名(例如www.example.com)後顯示警告消息。
當我輸入www.example.com時,重定向到https://www.example.com(SSL)。
請告訴我如何使用HTTP://www.example.com中,而不是HTTPS的://www.example.com中(SSL)。
到目前爲止,我不想爲我的域購買和配置SSL證書。
我註釋掉了config.force_ssl = true
in production.rb。
配置\ production.rb
SampleApp::Application.configure do
#config.force_ssl = true
config.serve_static_assets = true
end
它沒有任何區別。默認值是'false'。 –
感謝您的評論,@Yasin和@Simone Carletti。它在將其保存在'\ config \ environments \ production.rb'內,並保存在'\ config \ production.rb'中後可以工作。該文件保存在錯誤的路徑中。 – SamuraiBlue