userver: userver/server/request/request_config.hpp Source File
Loading...
Searching...
No Matches
request_config.hpp
1#pragma once
2
3#include <cstdint>
4
5#include <userver/server/http/http_status.hpp>
6#include <userver/yaml_config/yaml_config.hpp>
7
8USERVER_NAMESPACE_BEGIN
9
10namespace server::request {
11
12struct HttpRequestConfig {
13 std::size_t max_url_size = 8192;
14 std::size_t max_request_size = 1024 * 1024;
15 std::size_t max_headers_size = 65536;
16 bool parse_args_from_body = false;
17 bool testing_mode = false;
18 bool decompress_request = false;
19 bool set_tracing_headers = true;
20 bool deadline_propagation_enabled = true;
21 http::HttpStatus deadline_expired_status_code{498};
22};
23
24HttpRequestConfig Parse(const yaml_config::YamlConfig& value,
25 formats::parse::To<HttpRequestConfig>);
26
27} // namespace server::request
28
29USERVER_NAMESPACE_END