mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
REPP API changes
This commit is contained in:
parent
822b325bc0
commit
ccd34ed4a9
5 changed files with 62 additions and 12 deletions
|
@ -8,10 +8,10 @@ module Repp
|
|||
end
|
||||
|
||||
before do
|
||||
next if Rails.env.test?
|
||||
next if Rails.env.test? || Rails.env.development?
|
||||
message = 'Certificate mismatch! Cert common name should be:'
|
||||
request_name = env['HTTP_SSL_CLIENT_S_DN_CN']
|
||||
|
||||
|
||||
if request.ip == ENV['webclient_ip']
|
||||
webclient_cert_name = ENV['webclient_cert_common_name'] || 'webclient'
|
||||
error! "Webclient #{message} #{webclient_cert_name}", 401 if webclient_cert_name != request_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue