LoginSignup
0
0

More than 3 years have passed since last update.

【Rails】SSLの導入【Rails Tutorial 7章まとめ】

Posted at

SSL

Secure Sockets Layer(SSL)は、ローカルのサーバーからネットワークに流れるデータを暗号化し、セキュリティを強化する技術である。
SSLを使うとURLがhttpからhttpsに変わる。

SSLの導入

本番環境用の設定ファイルであるproduction.rbのconfig.force_sslをtrueに設定し、本番環境で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

50行目あたりにある。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0