Sha256: c602afcbd5add3cb77b19e568754987553c39bf76abfc680875ae5377627c142

Contents?: true

Size: 494 Bytes

Versions: 15

Compression:

Stored size: 494 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

    config.before_initialize do
      GovukLogging.configure if Rails.env.production?
    end

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
govuk_app_config-8.0.2 lib/govuk_app_config/railtie.rb
govuk_app_config-8.0.1 lib/govuk_app_config/railtie.rb
govuk_app_config-8.0.0 lib/govuk_app_config/railtie.rb
govuk_app_config-7.2.1 lib/govuk_app_config/railtie.rb
govuk_app_config-7.2.0 lib/govuk_app_config/railtie.rb
govuk_app_config-7.1.0 lib/govuk_app_config/railtie.rb
govuk_app_config-7.0.0 lib/govuk_app_config/railtie.rb
govuk_app_config-6.0.1 lib/govuk_app_config/railtie.rb
govuk_app_config-6.0.0 lib/govuk_app_config/railtie.rb
govuk_app_config-5.1.0 lib/govuk_app_config/railtie.rb
govuk_app_config-5.0.0 lib/govuk_app_config/railtie.rb
govuk_app_config-4.13.0 lib/govuk_app_config/railtie.rb
govuk_app_config-4.12.0 lib/govuk_app_config/railtie.rb
govuk_app_config-4.11.1 lib/govuk_app_config/railtie.rb
govuk_app_config-4.11.0 lib/govuk_app_config/railtie.rb