We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c28377f commit 06e9b13Copy full SHA for 06e9b13
lib/aikido/zen/actor.rb
@@ -65,7 +65,7 @@ def self.from_json(data)
65
def initialize(
66
id:,
67
name: nil,
68
- ip: Aikido::Zen.current_context&.request&.ip,
+ ip: Aikido::Zen.current_context&.request&.client_ip,
69
first_seen_at: Time.now.utc,
70
last_seen_at: first_seen_at
71
)
@@ -96,7 +96,7 @@ def ip
96
# always keep the most recent time if this conflicts with the current
97
# value.
98
# @return [void]
99
- def update(seen_at: Time.now.utc, ip: Aikido::Zen.current_context&.request&.ip)
+ def update(seen_at: Time.now.utc, ip: Aikido::Zen.current_context&.request&.client_ip)
100
@last_seen_at.try_update { |last_seen_at| [last_seen_at, seen_at].max }
101
@ip.try_update { |last_ip| [ip, last_ip].compact.first }
102
end
0 commit comments