Merge pull request #1045 from Retrospring/fix-real-ip
This commit is contained in:
commit
90335140c7
|
@ -41,7 +41,7 @@ class Ajax::QuestionController < AjaxController
|
||||||
target_user_id: params[:rcpt],
|
target_user_id: params[:rcpt],
|
||||||
content: params[:question],
|
content: params[:question],
|
||||||
anonymous: params[:anonymousQuestion],
|
anonymous: params[:anonymousQuestion],
|
||||||
author_identifier: AnonymousBlock.get_identifier(request.ip)
|
author_identifier: AnonymousBlock.get_identifier(request.remote_ip)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -60,7 +60,7 @@ class ApplicationController < ActionController::Base
|
||||||
if current_user.present?
|
if current_user.present?
|
||||||
Sentry.set_user({ id: current_user.id })
|
Sentry.set_user({ id: current_user.id })
|
||||||
else
|
else
|
||||||
Sentry.set_user({ ip_address: request.ip })
|
Sentry.set_user({ ip_address: request.remote_ip })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue