6#include <userver/components/fs_cache.hpp>
7#include <userver/dynamic_config/source.hpp>
8#include <userver/fs/fs_cache_client.hpp>
9#include <userver/server/handlers/http_handler_base.hpp>
11USERVER_NAMESPACE_BEGIN
13namespace server::handlers {
48class HttpHandlerStatic
final :
public HttpHandlerBase {
52 static constexpr std::string_view
kName =
"handler-static";
54 using HttpHandlerBase::HttpHandlerBase;
56 HttpHandlerStatic(
const components::ComponentConfig& config,
const components::ComponentContext& context);
58 std::string
HandleRequestThrow(
const http::HttpRequest& request, request::RequestContext&)
const override;
60 static yaml_config::Schema GetStaticConfigSchema();
63 dynamic_config::Source config_;
64 const fs::FsCacheClient& storage_;
65 const std::chrono::seconds cache_age_;
66 const std::string directory_file_;
67 const std::string not_found_file_;