@@ -88,8 +88,8 @@ def legecy_envs
88
88
89
89
# = Rack Attach
90
90
field :rack_attack , type : :hash , default : {
91
- limit : ENV [ "rack_attack.limit" ] || 0 ,
92
- period : ENV [ "rack_attack.period" ] || 3 . minutes ,
91
+ limit : 0 ,
92
+ period : 3 . minutes ,
93
93
}
94
94
95
95
# = Uploader
@@ -108,27 +108,27 @@ def legecy_envs
108
108
field :mailer_provider , default : ( ENV [ "mailer_provider" ] || "smtp" ) , readonly : true
109
109
field :mailer_sender , default : ( ENV [ "mailer_sender" ] || "no-reply@localhost" ) , readonly : true
110
110
field :mailer_options , type : :hash , readonly : true , default : {
111
- api_key : ( ENV [ "mailer_options_api_key" ] || ENV [ "mailer_options.api_key" ] ) ,
112
- address : ( ENV [ "mailer_options_address" ] || ENV [ "mailer_options.address" ] ) ,
113
- port : ( ENV [ "mailer_options_port" ] || ENV [ "mailer_options.port" ] ) ,
114
- domain : ( ENV [ "mailer_options_domain" ] || ENV [ "mailer_options.domain" ] ) ,
115
- user_name : ( ENV [ "mailer_options_user_name" ] || ENV [ "mailer_options.user_name" ] ) ,
116
- password : ( ENV [ "mailer_options_password" ] || ENV [ "mailer_options.password" ] ) ,
117
- authentication : ( ENV [ "mailer_options_authentication" ] || ENV [ "mailer_options.authentication" ] || "login" ) ,
118
- enable_starttls_auto : ( ENV [ "mailer_options_enable_starttls_auto" ] || ENV [ "mailer_options.enable_starttls_auto" ] )
111
+ api_key : ENV [ "mailer_options_api_key" ] ,
112
+ address : ENV [ "mailer_options_address" ] ,
113
+ port : ENV [ "mailer_options_port" ] ,
114
+ domain : ENV [ "mailer_options_domain" ] ,
115
+ user_name : ENV [ "mailer_options_user_name" ] ,
116
+ password : ENV [ "mailer_options_password" ] ,
117
+ authentication : ( ENV [ "mailer_options_authentication" ] || "login" ) ,
118
+ enable_starttls_auto : ENV [ "mailer_options_enable_starttls_auto" ]
119
119
}
120
120
121
121
# = SSO
122
122
field :sso , type : :hash , readonly : true , default : {
123
- enable : ( ENV [ "sso_enable" ] || ENV [ "sso.enable" ] || false ) ,
124
- enable_provider : ( ENV [ "sso_enable_provider" ] || ENV [ "sso_enable.provider" ] || false ) ,
125
- url : ( ENV [ "sso_url" ] || ENV [ "sso.url" ] ) ,
126
- secret : ( ENV [ "sso_secret" ] || ENV [ "sso.secret" ] ) ,
123
+ enable : ( ENV [ "sso_enable" ] || false ) ,
124
+ enable_provider : ( ENV [ "sso_enable_provider" ] || false ) ,
125
+ url : ENV [ "sso_url" ] ,
126
+ secret : ENV [ "sso_secret" ] ,
127
127
}
128
128
129
129
# = Omniauth API Keys
130
- field :github_api_key , default : ( ENV [ "github_api_key" ] || ENV [ "github_token" ] )
131
- field :github_api_secret , default : ( ENV [ "github_api_secret" ] || ENV [ "github_secret" ] )
130
+ field :github_api_key , default : ENV [ "github_api_key" ]
131
+ field :github_api_secret , default : ENV [ "github_api_secret" ]
132
132
field :twitter_api_key , default : ENV [ "twitter_api_key" ]
133
133
field :twitter_api_secret , default : ENV [ "twitter_api_secret" ]
134
134
field :wechat_api_key , default : ENV [ "wechat_api_key" ]
0 commit comments