This commit is contained in:
Alexey Milovidov 2024-03-25 03:28:37 +01:00
parent 3d5908b876
commit 8cf4c3bd3f

View File

@ -20,14 +20,12 @@ namespace
class FunctionGetClientHTTPHeader : public IFunction, WithContext class FunctionGetClientHTTPHeader : public IFunction, WithContext
{ {
private:
public: public:
explicit FunctionGetClientHTTPHeader(ContextPtr context_) explicit FunctionGetClientHTTPHeader(ContextPtr context_)
: WithContext(context_) : WithContext(context_)
{ {
if (!getContext()->getSettingsRef().allow_get_client_http_header) if (!getContext()->getSettingsRef().allow_get_client_http_header)
throw Exception(ErrorCodes::FUNCTION_NOT_ALLOWED, "The function {} requires setting `allow_get_client_http_header` to be enabled.", getName()); throw Exception(ErrorCodes::FUNCTION_NOT_ALLOWED, "The function getClientHTTPHeader requires setting `allow_get_client_http_header` to be enabled.");
} }
String getName() const override { return "getClientHTTPHeader"; } String getName() const override { return "getClientHTTPHeader"; }