From 179509667698a5f37b4ac8d8ba6dc14b80f14990 Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Thu, 9 Sep 2021 11:07:23 +0300 Subject: [PATCH] change key token --- app/controllers/repp/v1/base_controller.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/repp/v1/base_controller.rb b/app/controllers/repp/v1/base_controller.rb index d461878164..d74d0a9c11 100644 --- a/app/controllers/repp/v1/base_controller.rb +++ b/app/controllers/repp/v1/base_controller.rb @@ -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'] @@ -136,6 +134,10 @@ def validate_webclient_ca render(json: @response, status: :unauthorized) end + + def logger + Rails.logger + end end end end