mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
DEV: allow dev:populate
rake task in production environment. (#13777)
To use this rake task in production `ALLOW_DEV_POPULATE` environment variable should be set to "1".
This commit is contained in:
@ -1003,6 +1003,10 @@ module Discourse
|
||||
headers['Access-Control-Allow-Methods'] = CDN_REQUEST_METHODS.join(", ")
|
||||
headers
|
||||
end
|
||||
|
||||
def self.allow_dev_populate?
|
||||
Rails.env.development? || ENV["ALLOW_DEV_POPULATE"] == "1"
|
||||
end
|
||||
end
|
||||
|
||||
# rubocop:enable Style/GlobalVars
|
||||
|
Reference in New Issue
Block a user