mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +02:00
change key token
This commit is contained in:
parent
62ce5ff561
commit
11b7a13cf3
4 changed files with 7 additions and 14 deletions
|
@ -117,14 +117,12 @@ module Repp
|
|||
return if Rails.env.test?
|
||||
|
||||
header = request.headers['AccreditationToken']
|
||||
return if header == 'TEMPORARY_SECRET_KEY'
|
||||
return if header == ENV['accreditation_secret']
|
||||
|
||||
ENV['webclient_ips'].split(',').map(&:strip).include?(request.ip)
|
||||
end
|
||||
|
||||
def validate_webclient_ca
|
||||
|
||||
|
||||
return unless webclient_request?
|
||||
|
||||
request_name = request.env['HTTP_SSL_CLIENT_S_DN_CN']
|
||||
|
@ -136,6 +134,10 @@ module Repp
|
|||
|
||||
render(json: @response, status: :unauthorized)
|
||||
end
|
||||
|
||||
def logger
|
||||
Rails.logger
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue