6#include <userver/engine/mutex.hpp>
7#include <userver/server/handlers/http_handler_base.hpp>
15namespace server::http {
16class HandlerInfoIndex;
19namespace server::handlers::auth {
24namespace server::handlers {
72 static constexpr std::string_view
kName =
"handler-implicit-http-options";
75 const components::ComponentConfig& config,
76 const components::ComponentContext& component_context,
77 bool is_monitor =
false
80 ~ImplicitOptions()
override;
82 std::string
HandleRequestThrow(
const server::http::HttpRequest& request, server::request::RequestContext& context)
85 static yaml_config::Schema GetStaticConfigSchema();
88 using AuthCheckers = std::unordered_map<std::string, auth::AuthCheckerBasePtr>;
90 std::string ExtractAllowedMethods(
const std::string& path)
const;
92 const http::HandlerInfoIndex& GetHandlerInfoIndex()
const;
94 const Server& server_;
95 const AuthCheckers auth_checkers_;
97 mutable engine::Mutex handler_info_index_mutex_;
98 mutable const http::HandlerInfoIndex* handler_info_index_ =
nullptr;
104inline constexpr bool components::kHasValidate<server::handlers::ImplicitOptions> =
true;