aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-09-30 09:06:48 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-09-30 09:06:48 +0900
commit5d149048ffa56c8fa1c41d1ef3bcf9472052f369 (patch)
tree6dff25af9fb4a10c40b280be5deb222b18928f43 /actionpack/lib/action_dispatch/middleware
parent325c06fbc499aa4da1ce50d9b85dbf5c6ed3321e (diff)
downloadrails-5d149048ffa56c8fa1c41d1ef3bcf9472052f369.tar.gz
rails-5d149048ffa56c8fa1c41d1ef3bcf9472052f369.tar.bz2
rails-5d149048ffa56c8fa1c41d1ef3bcf9472052f369.zip
Don't use Active Support where it is not needed.
This code has been changed with https://github.com/rails/rails/pull/30735/files#diff-8e5f6b33c191ad6dec07f3288345a13fL47. However, `active_support/time` is not load automatically, so if use Action Pack alone, `days` method can not use and an error occurs. In this case, I think that there is no problem by specifying a value with Integer.
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r--actionpack/lib/action_dispatch/middleware/ssl.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/ssl.rb b/actionpack/lib/action_dispatch/middleware/ssl.rb
index 9e1684f689..ef633aadc6 100644
--- a/actionpack/lib/action_dispatch/middleware/ssl.rb
+++ b/actionpack/lib/action_dispatch/middleware/ssl.rb
@@ -49,7 +49,7 @@ module ActionDispatch
# Default to 180 days, the low end for https://www.ssllabs.com/ssltest/
# and greater than the 18-week requirement for browser preload lists.
- HSTS_EXPIRES_IN = 180.days.to_i
+ HSTS_EXPIRES_IN = 15552000
def self.default_hsts_options
{ expires: HSTS_EXPIRES_IN, subdomains: true, preload: false }