Skip to content

Commit

Permalink
change key token
Browse files Browse the repository at this point in the history
  • Loading branch information
olegphenomenon committed Oct 28, 2021
1 parent fe191de commit 1795096
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/controllers/repp/v1/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,12 @@ def webclient_request?
return if Rails.env.test?

header = request.headers['AccreditationToken']
return if header == 'TEMPORARY_SECRET_KEY'
return if header == 'temporary-secret-key'

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']
Expand All @@ -136,6 +134,10 @@ def validate_webclient_ca

render(json: @response, status: :unauthorized)
end

def logger
Rails.logger
end
end
end
end

0 comments on commit 1795096

Please sign in to comment.