9#include <userver/components/loggable_component_base.hpp>
11USERVER_NAMESPACE_BEGIN
17namespace server::middlewares {
38using MiddlewaresList = std::vector<std::string>;
51 static constexpr std::string_view kName{
52 "default-server-middleware-pipeline-builder"};
54 PipelineBuilder(
const components::ComponentConfig&,
66 auto& resulting_pipeline = userver_middleware_pipeline;
67 const auto& middlewares_to_append = GetMiddlewaresToAppend();
69 resulting_pipeline.insert(resulting_pipeline.end(),
70 middlewares_to_append.begin(),
71 middlewares_to_append.end());
73 return resulting_pipeline;
79 const MiddlewaresList& GetMiddlewaresToAppend()
const;
82 MiddlewaresList middlewares_to_append_;
92 static constexpr std::string_view kName{
93 "default-handler-middleware-pipeline-builder"};
95 HandlerPipelineBuilder(
const components::ComponentConfig&,
107 return server_middleware_pipeline;
115 components::kHasValidate<server::middlewares::PipelineBuilder> =
true;
119 components::kConfigFileMode<server::middlewares::PipelineBuilder> =
124 components::kHasValidate<server::middlewares::HandlerPipelineBuilder> =
129 components::kConfigFileMode<server::middlewares::HandlerPipelineBuilder> =