[deploy] Generate Random Health Check Tokens on App Setup (#8178)
Co-authored-by: rhymes <rhymesete@gmail.com>
This commit is contained in:
parent
af6d2325e6
commit
e1b99b1b96
2 changed files with 3 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ class SiteConfig < RailsSettings::Base
|
|||
cache_prefix { "v1" }
|
||||
|
||||
# API Tokens
|
||||
field :health_check_token, type: :string, default: "secret"
|
||||
field :health_check_token, type: :string
|
||||
|
||||
# Authentication
|
||||
field :authentication_providers, type: :array, default: Authentication::Providers.available
|
||||
|
|
|
|||
|
|
@ -14,5 +14,7 @@ namespace :app_initializer do
|
|||
|
||||
puts "\n== Updating Data =="
|
||||
Rake::Task["data_updates:enqueue_data_update_worker"].execute
|
||||
|
||||
SiteConfig.health_check_token ||= SecureRandom.hex(10)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue