v.24.3New Feature

Add getClientHTTPHeader function, closes #54665

Add a new function, getClientHTTPHeader. This closes #54665. Co-authored with @lingtaolf. #61820 (Alexey Milovidov).
Introduces a new ClickHouse function getClientHTTPHeader to retrieve specific HTTP header values from client requests.

Why it matters

This feature enables users to access HTTP header information sent by clients directly within ClickHouse queries. It solves the problem of extracting client HTTP metadata, facilitating advanced query logic, auditing, and debugging based on request headers.

How to use it

Use the function getClientHTTPHeader(header_name) in your queries, where header_name is a string specifying the name of the HTTP header you want to retrieve. For example:

SELECT getClientHTTPHeader('User-Agent') FROM ...