2019-11-28 06:16:25 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-11-26 22:09:40 +08:00
|
|
|
Rails.application.configure do
|
2019-11-29 17:28:50 +08:00
|
|
|
config.x.core_api_sign_alg = ENV['CORE_API_SIGN_ALG'] || 'HS256'
|
2019-11-26 22:09:40 +08:00
|
|
|
|
2019-11-29 17:28:50 +08:00
|
|
|
config.x.core_api_token_ttl = ENV['CORE_API_TOKEN_TTL'] ? ENV['CORE_API_TOKEN_TTL'].to_i.seconds : 30.minutes
|
2018-07-24 20:21:33 +08:00
|
|
|
|
2019-11-29 17:28:50 +08:00
|
|
|
config.x.core_api_token_iss = ENV['CORE_API_TOKEN_ISS'] || 'SciNote'
|
2018-10-11 15:48:06 +08:00
|
|
|
|
2019-11-26 22:09:40 +08:00
|
|
|
config.x.core_api_rate_limit = ENV['CORE_API_RATE_LIMIT'] ? ENV['CORE_API_RATE_LIMIT'].to_i : 1000
|
|
|
|
|
2019-11-29 17:28:50 +08:00
|
|
|
config.x.core_api_v1_enabled = ENV['CORE_API_V1_ENABLED'] || false
|
2018-07-24 20:21:33 +08:00
|
|
|
end
|