From 496f624c3a85376762ace88159f0a280b9581830 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Tue, 2 Feb 2021 14:20:27 -0500 Subject: [PATCH] Updated IP in captcha MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated: - IP in captcha --- app/controllers/auth/registrations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb index 61dda72e..1f3a1374 100644 --- a/app/controllers/auth/registrations_controller.rb +++ b/app/controllers/auth/registrations_controller.rb @@ -107,7 +107,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController "serverKey" => ENV.fetch('GAB_CAPTCHA_SECRET_KEY', ''), "value" => typedChallenge, "username" => username, - "ip" => request.env['REMOTE_ADDR'] + "ip" => request.headers['CF-Real-IP'] }).perform do |res| body = JSON.parse(res.body_with_limit) result = !!body["success"]