Skip to content

Commit

Permalink
Fixes #23115 - session is used instead session_safe
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap authored and mmoll committed Apr 6, 2018
1 parent 7bf12c7 commit e5e1523
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/proxy_api/resource.rb
Expand Up @@ -108,7 +108,7 @@ def with_logger
end

def request_id
::Logging.mdc['session_safe'] || SecureRandom.hex(32)
::Logging.mdc['session'] || SecureRandom.hex(32)
end

def ssl_auth_params
Expand Down
4 changes: 2 additions & 2 deletions test/unit/proxy_api/resource_test.rb
Expand Up @@ -11,10 +11,10 @@ class ProxyApiResourceTest < ActiveSupport::TestCase

test "connect_params sets x_request_id to logger safe session ID" do
begin
::Logging.mdc['session_safe'] = 'test'
::Logging.mdc['session'] = 'test'
assert_equal 'test', ProxyAPI::Resource.new({}).send(:connect_params)[:headers][:x_request_id]
ensure
::Logging.mdc.delete('session_safe')
::Logging.mdc.delete('session')
end
end

Expand Down

0 comments on commit e5e1523

Please sign in to comment.