mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 21:16:12 +02:00
Modified white ip form and created mailer
This commit is contained in:
parent
311834c085
commit
e00e44c9b8
10 changed files with 83 additions and 21 deletions
|
@ -130,6 +130,11 @@ module Repp
|
|||
render(json: @response, status: :unauthorized)
|
||||
end
|
||||
|
||||
def render_unauthorized_response
|
||||
@response = { code: 2202, message: I18n.t('registrar.authorization.ip_not_allowed', ip: request.ip) }
|
||||
render json: @response, status: :unauthorized
|
||||
end
|
||||
|
||||
def webclient_request?
|
||||
return false if Rails.env.test? || Rails.env.development?
|
||||
|
||||
|
@ -144,8 +149,7 @@ module Repp
|
|||
webclient_cn = ENV['webclient_cert_common_name'] || 'webclient'
|
||||
return if request_name == webclient_cn
|
||||
|
||||
@response = { code: 2202,
|
||||
message: I18n.t('registrar.authorization.ip_not_allowed', ip: request.ip) }
|
||||
@response = { code: 2202, message: 'Invalid webclient certificate' }
|
||||
|
||||
render(json: @response, status: :unauthorized)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue