lib/rack/app/endpoint/builder.rb in rack-app-5.7.0 vs lib/rack/app/endpoint/builder.rb in rack-app-5.8.0

- old
+ new

@@ -5,22 +5,17 @@ @config = config end def build builder = Rack::Builder.new - apply_core_middlewares(builder) apply_middleware_build_blocks(builder) builder.run(Rack::App::Endpoint::Executor.new(@config)) builder.to_app end protected - def apply_core_middlewares(builder) - builder.use(Rack::App::Middlewares::Configuration::PayloadParserSetter) - end - def apply_middleware_build_blocks(builder) builder_blocks.each do |builder_block| builder_block.call(builder) end builder.use(Rack::App::Middlewares::Configuration, @config) @@ -35,9 +30,9 @@ builder.use(Rack::App::Middlewares::Hooks::After, after_block) end end def builder_blocks - @config.app_class.middlewares + @config.middleware_builders_blocks + [@config.app_class.middlewares, @config.middleware_builders_blocks].flatten end end