6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/enforce_ssl/base_railtie.rb', line 6
def self.configuration(app)
app.config.class.class_eval do
attr_accessor :no_ssl_port
attr_accessor :ssl_port
attr_accessor :hsts_max_age
attr_accessor :hsts_include_sub_domain
end
if Rails.env == "production"
app.config.no_ssl_port = 80
app.config.ssl_port = 443
else
app.config.no_ssl_port = 8080
app.config.ssl_port = 8443
end
app.config.hsts_include_sub_domain = false
app.config.hsts_max_age = 31536000 end
|