8#include <userver/components/component_base.hpp>
9#include <userver/server/http/http_request.hpp>
10#include <userver/yaml_config/schema.hpp>
11#include <userver/yaml_config/yaml_config.hpp>
13USERVER_NAMESPACE_BEGIN
34 virtual ~HttpMiddlewareBase();
46 std::unique_ptr<HttpMiddlewareBase> next_{
nullptr};
54 HttpMiddlewareFactoryBase(
const components::ComponentConfig&,
const components::ComponentContext&);
56 std::unique_ptr<HttpMiddlewareBase>
57 CreateChecked(
const handlers::HttpHandlerBase& handler, yaml_config::YamlConfig middleware_config)
const;
72template <
typename Middleware>
75 static constexpr std::string_view kName = Middleware::kName;
80 std::unique_ptr<HttpMiddlewareBase> Create(
const handlers::HttpHandlerBase& handler, yaml_config::YamlConfig)
82 return std::make_unique<Middleware>(handler);
89template <
typename Middleware>
90inline constexpr bool components::kHasValidate<server::middlewares::SimpleHttpMiddlewareFactory<Middleware>> =
true;
92template <
typename Middleware>
93inline constexpr auto components::kConfigFileMode<server::middlewares::SimpleHttpMiddlewareFactory<Middleware>> =