Merge pull request #1045 from Retrospring/fix-real-ip

This commit is contained in:
Georg Gadinger 2023-02-05 09:26:06 +01:00 committed by GitHub
commit 90335140c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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