Skip to content

Commit

Permalink
First timers recaptcha Environment Variables (#2786)
Browse files Browse the repository at this point in the history
* Edited the if statement

* Added the env variables

* Edited ENV variable, and added fallback
  • Loading branch information
gdestree authored and jywarren committed Jun 7, 2018
1 parent e56cf45 commit 9172df4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/initializers/recaptcha.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 9172df4

Please sign in to comment.