mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +02:00
parent
17fefcf592
commit
d430092ba2
1 changed files with 6 additions and 1 deletions
|
@ -388,7 +388,7 @@ class EppController < ApplicationController
|
|||
def update_epp_session
|
||||
iptables_counter_update
|
||||
|
||||
if !Rails.env.development? && (epp_session.updated_at < Time.zone.now - 5.minutes)
|
||||
if !Rails.env.development? && session_timeout_reached?
|
||||
@api_user = current_user # cache current_user for logging
|
||||
epp_session.destroy
|
||||
response.headers['X-EPP-Returncode'] = '1500'
|
||||
|
@ -403,4 +403,9 @@ class EppController < ApplicationController
|
|||
epp_session.update_column(:updated_at, Time.zone.now)
|
||||
end
|
||||
end
|
||||
|
||||
def session_timeout_reached?
|
||||
timeout = 5.minutes
|
||||
epp_session.updated_at < (Time.zone.now - timeout)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue