From f1a545aea55c0fd6e7819983c193a775fd8ff930 Mon Sep 17 00:00:00 2001 From: Georg Gadinger Date: Sat, 4 Feb 2023 22:31:53 +0100 Subject: [PATCH] use remote_ip --- app/controllers/ajax/question_controller.rb | 2 +- app/controllers/application_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/ajax/question_controller.rb b/app/controllers/ajax/question_controller.rb index e86e1572..5d10cf2f 100644 --- a/app/controllers/ajax/question_controller.rb +++ b/app/controllers/ajax/question_controller.rb @@ -41,7 +41,7 @@ class Ajax::QuestionController < AjaxController target_user_id: params[:rcpt], content: params[:question], anonymous: params[:anonymousQuestion], - author_identifier: AnonymousBlock.get_identifier(request.ip) + author_identifier: AnonymousBlock.get_identifier(request.remote_ip) ) end end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 05b7ad28..64ed88c7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -60,7 +60,7 @@ class ApplicationController < ActionController::Base if current_user.present? Sentry.set_user({ id: current_user.id }) else - Sentry.set_user({ ip_address: request.ip }) + Sentry.set_user({ ip_address: request.remote_ip }) end end end