所以我的域有問題。我有一個 ruby?? on rails Heroku 應用程式,并從 google 域購買了一個域。我無法讓“http://www.myapp.com”重定向到“https://www.myapp.com”只是最終根本不作業。任何幫助都會很棒!
uj5u.com熱心網友回復:
如果您希望提供整個應用程式,https那么您可以設定 force_ssl配置
# config/environments/production.rb
Rails.application.configure do
# [..]
# Force all access to the app over SSL, use Strict-Transport-Security,
# and use secure cookies.
config.force_ssl = true
end
您可以參考這篇文章了解更多資訊。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/493385.html
