8#include <userver/components/component_base.hpp>
9#include <userver/yaml_config/schema.hpp>
10#include <userver/yaml_config/yaml_config.hpp>
12USERVER_NAMESPACE_BEGIN
37 virtual ~HttpMiddlewareBase();
49 std::unique_ptr<HttpMiddlewareBase> next_{
nullptr};
57 HttpMiddlewareFactoryBase(
const components::ComponentConfig&,
const components::ComponentContext&);
59 std::unique_ptr<HttpMiddlewareBase>
60 CreateChecked(
const handlers::HttpHandlerBase& handler, yaml_config::YamlConfig middleware_config)
const;
75template <
typename Middleware>
78 static constexpr std::string_view kName = Middleware::kName;
83 std::unique_ptr<HttpMiddlewareBase> Create(
const handlers::HttpHandlerBase& handler, yaml_config::YamlConfig)
85 return std::make_unique<Middleware>(handler);
92template <
typename Middleware>
93inline constexpr bool components::kHasValidate<server::middlewares::SimpleHttpMiddlewareFactory<Middleware>> =
true;
95template <
typename Middleware>
96inline constexpr auto components::kConfigFileMode<server::middlewares::SimpleHttpMiddlewareFactory<Middleware>> =