lib/hanami/app.rb in hanami-0.9.2 vs lib/hanami/app.rb in hanami-1.0.0.beta1
- old
+ new
@@ -1,9 +1,10 @@
require 'rack'
require 'rack/builder'
require 'hanami/router'
require 'hanami/components'
+require 'hanami/common_logger'
module Hanami
# Main application that mounts many Rack and/or Hanami applications.
#
# @see Hanami.app
@@ -60,9 +61,12 @@
end
# @since 0.9.0
# @api private
def middleware(environment)
+ builder.use Hanami::CommonLogger, Hanami.logger
+ builder.use Rack::ContentLength
+
if middleware = environment.static_assets_middleware # rubocop:disable Lint/AssignmentInCondition
builder.use middleware
end
builder.use Rack::MethodOverride