Remove EPP session timeout and certificate check in dev env

#284
This commit is contained in:
Artur Beljajev 2016-12-16 05:31:57 +02:00
parent f6522dd62c
commit c6aa74529c
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@ class Epp::SessionsController < EppController
end end
end end
if !webclient_request && @api_user if !Rails.env.development? && (!webclient_request && @api_user)
unless @api_user.api_pki_ok?(request.env['HTTP_SSL_CLIENT_CERT'], request.env['HTTP_SSL_CLIENT_S_DN_CN']) unless @api_user.api_pki_ok?(request.env['HTTP_SSL_CLIENT_CERT'], request.env['HTTP_SSL_CLIENT_S_DN_CN'])
epp_errors << { epp_errors << {
msg: 'Authentication error; server closing connection (certificate is not valid)', msg: 'Authentication error; server closing connection (certificate is not valid)',

View file

@ -97,7 +97,7 @@ class EppController < ApplicationController
e_s = epp_session e_s = epp_session
return if e_s.new_record? return if e_s.new_record?
if e_s.updated_at < Time.zone.now - 5.minutes if !Rails.env.development? && (e_s.updated_at < Time.zone.now - 5.minutes)
@api_user = current_user # cache current_user for logging @api_user = current_user # cache current_user for logging
e_s.destroy e_s.destroy
response.headers['X-EPP-Returncode'] = '1500' response.headers['X-EPP-Returncode'] = '1500'