Sha256: 2c43e4c29e41d0954f191ee7563c0eb1a2d588911ca9beca5547d277b36c5ab9

Contents?: true

Size: 910 Bytes

Versions: 28

Compression:

Stored size: 910 Bytes

Contents

app = Rails.application
app.config.middleware.use(Mongoid::QueryCache::Middleware)
app.config.middleware.use(Workarea::Elasticsearch::QueryCache::Middleware)

if !app.config.action_dispatch.rack_cache
  app.config.middleware.use Dragonfly::Middleware, :workarea
else
  require 'rack/cache'
  app.config.middleware.insert_after Rack::Cache, Dragonfly::Middleware, :workarea
end

unless Rails.env.test? || Rails.env.development?
  app.config.middleware.insert 0, Rack::Timeout
  app.config.middleware.insert 1, Rack::Attack
end

# This serves sample files for imports
Rails.application.config.middleware.insert_after(
  Rack::Sendfile,
  ActionDispatch::Static,
  "#{Workarea::Admin.root}/public"
)

app.config.middleware.use Workarea::EnforceHostMiddleware
app.config.middleware.insert(0, Workarea::ApplicationMiddleware)
app.config.middleware.insert(0, Workarea::StripHttpCachingMiddleware) if Rails.env.test?

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-core-3.5.27 config/initializers/10_rack_middleware.rb
workarea-core-3.5.26 config/initializers/10_rack_middleware.rb
workarea-core-3.5.25 config/initializers/10_rack_middleware.rb
workarea-core-3.5.23 config/initializers/10_rack_middleware.rb
workarea-core-3.5.22 config/initializers/10_rack_middleware.rb
workarea-core-3.5.21 config/initializers/10_rack_middleware.rb
workarea-core-3.5.20 config/initializers/10_rack_middleware.rb
workarea-core-3.5.19 config/initializers/10_rack_middleware.rb
workarea-core-3.5.18 config/initializers/10_rack_middleware.rb
workarea-core-3.5.17 config/initializers/10_rack_middleware.rb
workarea-core-3.5.16 config/initializers/10_rack_middleware.rb
workarea-core-3.5.15 config/initializers/10_rack_middleware.rb
workarea-core-3.5.14 config/initializers/10_rack_middleware.rb
workarea-core-3.5.13 config/initializers/10_rack_middleware.rb
workarea-core-3.5.12 config/initializers/10_rack_middleware.rb
workarea-core-3.5.11 config/initializers/10_rack_middleware.rb
workarea-core-3.5.10 config/initializers/10_rack_middleware.rb
workarea-core-3.5.9 config/initializers/10_rack_middleware.rb
workarea-core-3.5.8 config/initializers/10_rack_middleware.rb
workarea-core-3.5.7 config/initializers/10_rack_middleware.rb