Skip to content

Commit

Permalink
change key token
Browse files Browse the repository at this point in the history
  • Loading branch information
olegphenomenon committed Sep 9, 2021
1 parent c6f5e94 commit 7ec40ad
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/controllers/repp/v1/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ def webclient_request?
return if Rails.env.test?

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

ENV['webclient_ips'].split(',').map(&:strip).include?(request.ip)
end
Expand All @@ -136,6 +140,10 @@ def validate_webclient_ca

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

def logger
Rails.logger
end
end
end
end

0 comments on commit 7ec40ad

Please sign in to comment.