From 9172df4efdcb67995f88ad770fc6c71a22684c2e Mon Sep 17 00:00:00 2001 From: Gregor Destree Date: Thu, 7 Jun 2018 17:32:24 -0400 Subject: [PATCH] First timers recaptcha Environment Variables (#2786) * Edited the if statement * Added the env variables * Edited ENV variable, and added fallback --- config/initializers/recaptcha.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/initializers/recaptcha.rb b/config/initializers/recaptcha.rb index 6d610a9010..f3e388ec07 100644 --- a/config/initializers/recaptcha.rb +++ b/config/initializers/recaptcha.rb @@ -1,8 +1,8 @@ # config/initializers/recaptcha.rb -if Rails.env == "production" +if Rails.env.production? Recaptcha.configure do |config| - config.site_key = '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' - config.secret_key = '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe' + config.site_key = ENV["RECAPTCHA_SITE_KEY"] || '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' + config.secret_key = ENV["RECAPTCHA_SECRET_KEY"] || '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe' # Uncomment the following line if you are using a proxy server: # config.proxy = 'http://myproxy.com.au:8080' end