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 {
52class HttpHandlerStatic
final :
public HttpHandlerBase {
56 static constexpr std::string_view
kName =
"handler-static";
58 using HttpHandlerBase::HttpHandlerBase;
60 HttpHandlerStatic(
const components::ComponentConfig& config,
const components::ComponentContext& context);
62 std::string
HandleRequestThrow(
const http::HttpRequest& request, request::RequestContext&)
const override;
64 static yaml_config::Schema GetStaticConfigSchema();
67 dynamic_config::Source config_;
68 const fs::FsCacheClient& storage_;
69 const std::chrono::seconds cache_age_;
70 const std::string directory_file_;
71 const std::string not_found_file_;