Method: DecisionReview::PdfValidation::Configuration.base_request_headers

Defined in:
lib/decision_review/utilities/pdf_validation/configuration.rb

.base_request_headersHash

Returns The basic headers required for any decision review API call.

Returns:

  • (Hash)

    The basic headers required for any decision review API call.



23
24
25
26
27
28
29
30
31
# File 'lib/decision_review/utilities/pdf_validation/configuration.rb', line 23

def self.base_request_headers
  # Can use regular Decision Reviews API key in lower environments
  return super unless Rails.env.production?

  # Since we're using the `uploads/validate_document` endpoint under Benefits Intake API,
  # we need to use their API key. This is pulled from BenefitsIntakeService::Configuration
  api_key = Settings.benefits_intake_service.api_key || Settings.form526_backup.api_key
  super.merge('apiKey' => api_key)
end