From 6dd2f9848dc25c855605b71dd7c8bb798761b3d6 Mon Sep 17 00:00:00 2001 From: Tom Strassner Date: Fri, 6 Dec 2024 11:47:32 -0500 Subject: [PATCH] Fix setting of response headers in token endpoint --- .../endpoints/mock_authorization/token_endpoint.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/davinci_dtr_test_kit/endpoints/mock_authorization/token_endpoint.rb b/lib/davinci_dtr_test_kit/endpoints/mock_authorization/token_endpoint.rb index 1b7c0d4..6f21f69 100644 --- a/lib/davinci_dtr_test_kit/endpoints/mock_authorization/token_endpoint.rb +++ b/lib/davinci_dtr_test_kit/endpoints/mock_authorization/token_endpoint.rb @@ -35,11 +35,9 @@ def make_response response_hash.merge!(patient: smart_patient_input) if smart_patient_input response.body = response_hash.to_json - response.headers.merge( - 'Cache-Control' => 'no-store', - 'Pragma' => 'no-cache', - 'Access-Control-Allow-Origin' => '*' - ) + response.headers['Cache-Control'] = 'no-store' + response.headers['Pragma'] = 'no-cache' + response.headers['Access-Control-Allow-Origin'] = '*' response.status = 200 end