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 {
73 static constexpr std::string_view
kName =
"handler-implicit-http-options";
76 const components::ComponentConfig& config,
77 const components::ComponentContext& component_context,
78 bool is_monitor =
false
81 ~ImplicitOptions()
override;
83 std::string
HandleRequestThrow(
const server::http::HttpRequest& request, server::request::RequestContext& context)
86 static yaml_config::Schema GetStaticConfigSchema();
89 using AuthCheckers = std::unordered_map<std::string, auth::AuthCheckerBasePtr>;
91 std::string ExtractAllowedMethods(
const std::string& path)
const;
93 const http::HandlerInfoIndex& GetHandlerInfoIndex()
const;
95 const Server& server_;
96 const AuthCheckers auth_checkers_;
98 mutable engine::Mutex handler_info_index_mutex_;
99 mutable const http::HandlerInfoIndex* handler_info_index_ =
nullptr;
105inline constexpr bool components::kHasValidate<server::handlers::ImplicitOptions> =
true;