MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / fullUrlFilter

Function fullUrlFilter

src/Server/HTTPHandlerRequestFilter.cpp:149–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149HTTPRequestFilter fullUrlFilter(const Poco::Util::AbstractConfiguration & config, const std::string & config_path, HTTPRequestFilterMatchType match_type)
150{
151 return [expression = getExpression(config.getString(config_path), match_type, /* ignore_query_string= */ true)](const HTTPServerRequest & request)
152 {
153 const auto & server_address = request.serverAddress();
154 std::string url = fmt::format("{}://{}{}",
155 request.isSecure() ? "https" : "http",
156 server_address.toString(),
157 request.getURI());
158
159 return checkExpression(url, expression);
160 };
161}
162
163HTTPRequestFilter emptyQueryStringFilter()
164{

Callers 1

Calls 8

getExpressionFunction · 0.85
checkExpressionFunction · 0.85
serverAddressMethod · 0.80
getURIMethod · 0.80
formatFunction · 0.50
getStringMethod · 0.45
isSecureMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected