Sha256: 0814b7e2bb05e9de5414666978105046744065d5f73f61d8cf62819ce8176242

Contents?: true

Size: 718 Bytes

Versions: 20

Compression:

Stored size: 718 Bytes

Contents

require "plek"

module GovukAppConfig
  class Railtie < Rails::Railtie
    initializer "govuk_app_config.configure_govuk_proxy" do |app|
      if ENV["GOVUK_PROXY_STATIC_ENABLED"] == "true"
        app.middleware.use GovukProxy::StaticProxy, backend: Plek.find("static")
      end
    end

    initializer "govuk_app_config.configure_open_telemetry" do |app|
      unless Rails.const_defined?(:Console)
        GovukOpenTelemetry.configure(app.class.module_parent_name.underscore)
      end
    end

    config.before_initialize do
      GovukJsonLogging.configure if ENV["GOVUK_RAILS_JSON_LOGGING"]
    end

    config.after_initialize do
      GovukError.configure unless GovukError.is_configured?
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
govuk_app_config-9.11.2 lib/govuk_app_config/railtie.rb
govuk_app_config-9.11.1 lib/govuk_app_config/railtie.rb
govuk_app_config-9.11.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.10.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.9.2 lib/govuk_app_config/railtie.rb
govuk_app_config-9.9.1 lib/govuk_app_config/railtie.rb
govuk_app_config-9.9.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.8.2 lib/govuk_app_config/railtie.rb
govuk_app_config-9.8.1 lib/govuk_app_config/railtie.rb
govuk_app_config-9.8.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.7.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.6.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.5.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.4.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.3.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.2.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.1.0 lib/govuk_app_config/railtie.rb
govuk_app_config-9.0.4 lib/govuk_app_config/railtie.rb
govuk_app_config-9.0.3 lib/govuk_app_config/railtie.rb
govuk_app_config-9.0.2 lib/govuk_app_config/railtie.rb