Sha256: 84376b6dd87b5ee43e94371ee1763e7321a1eb0d6c83446b64201ced8a32a024

Contents?: true

Size: 939 Bytes

Versions: 34

Compression:

Stored size: 939 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
  app.config.middleware.insert_before Rack::Cache, Workarea::RackCacheConfigMiddleware
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

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

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
workarea-core-3.4.45 config/initializers/10_rack_middleware.rb
workarea-core-3.4.44 config/initializers/10_rack_middleware.rb
workarea-core-3.4.43 config/initializers/10_rack_middleware.rb
workarea-core-3.4.42 config/initializers/10_rack_middleware.rb
workarea-core-3.4.41 config/initializers/10_rack_middleware.rb
workarea-core-3.4.40 config/initializers/10_rack_middleware.rb
workarea-core-3.4.39 config/initializers/10_rack_middleware.rb
workarea-core-3.4.38 config/initializers/10_rack_middleware.rb
workarea-core-3.4.37 config/initializers/10_rack_middleware.rb
workarea-core-3.4.36 config/initializers/10_rack_middleware.rb
workarea-core-3.4.35 config/initializers/10_rack_middleware.rb
workarea-core-3.4.34 config/initializers/10_rack_middleware.rb
workarea-core-3.4.33 config/initializers/10_rack_middleware.rb
workarea-core-3.4.32 config/initializers/10_rack_middleware.rb
workarea-core-3.4.31 config/initializers/10_rack_middleware.rb
workarea-core-3.4.30 config/initializers/10_rack_middleware.rb
workarea-core-3.4.29 config/initializers/10_rack_middleware.rb
workarea-core-3.4.28 config/initializers/10_rack_middleware.rb
workarea-core-3.4.27 config/initializers/10_rack_middleware.rb
workarea-core-3.4.26 config/initializers/10_rack_middleware.rb