Skip to content

Commit

Permalink
Merge pull request #944 from alphagov/change-logs-to-debug-level
Browse files Browse the repository at this point in the history
Use debug level for logger when forwarding headers
  • Loading branch information
theseanything authored Jul 19, 2019
2 parents 1f5d1a1 + 76fb78f commit b79c93f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Adds middleware to allow the header `X-Govuk-Authenticated-User-Organisation`
to be passed along to content-store.
* Changes logging level about header forwarding from info to debug

# 59.5.1

Expand Down
10 changes: 5 additions & 5 deletions lib/gds_api/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
module GdsApi
class Railtie < Rails::Railtie
initializer "gds_api.initialize_govuk_request_id_sniffer" do |app|
Rails.logger.info "Using middleware GdsApi::GovukHeaderSniffer to sniff for GOVUK-Request-Id header"
Rails.logger.debug "Using middleware GdsApi::GovukHeaderSniffer to sniff for Govuk-Request-Id header"
app.middleware.use GdsApi::GovukHeaderSniffer, 'HTTP_GOVUK_REQUEST_ID'
end

initializer "gds_api.initialize_govuk_original_url_sniffer" do |app|
Rails.logger.info "Using middleware GdsApi::GovukHeaderSniffer to sniff for GOVUK-Original-Url header"
Rails.logger.debug "Using middleware GdsApi::GovukHeaderSniffer to sniff for Govuk-Original-Url header"
app.middleware.use GdsApi::GovukHeaderSniffer, 'HTTP_GOVUK_ORIGINAL_URL'
end

initializer "gds_api.initialize_govuk_authenticated_user_sniffer" do |app|
Rails.logger.info "Using middleware GdsApi::GovukHeaderSniffer to sniff for X-Govuk-Authenticated-User header"
Rails.logger.debug "Using middleware GdsApi::GovukHeaderSniffer to sniff for X-Govuk-Authenticated-User header"
app.middleware.use GdsApi::GovukHeaderSniffer, 'HTTP_X_GOVUK_AUTHENTICATED_USER'
end

initializer "gds_api.initialize_govuk_authenticated_user_organisation_sniffer" do |app|
Rails.logger.info "Using middleware GdsApi::GovukHeaderSniffer to sniff for X-Govuk-Authenticated-User-Organisation header"
Rails.logger.debug "Using middleware GdsApi::GovukHeaderSniffer to sniff for X-Govuk-Authenticated-User-Organisation header"
app.middleware.use GdsApi::GovukHeaderSniffer, 'HTTP_X_GOVUK_AUTHENTICATED_USER_ORGANISATION'
end

initializer "gds_api.initialize_govuk_content_id_sniffer" do |app|
Rails.logger.info "Using middleware GdsApi::GovukHeaderSniffer to sniff for Govuk-Auth-Bypass-Id header"
Rails.logger.debug "Using middleware GdsApi::GovukHeaderSniffer to sniff for Govuk-Auth-Bypass-Id header"
app.middleware.use GdsApi::GovukHeaderSniffer, 'HTTP_GOVUK_AUTH_BYPASS_ID'
end
end
Expand Down

0 comments on commit b79c93f

Please sign in to comment.