Skip to content

Commit 808614f

Browse files
committed
Adds info about headers and cookies
1 parent d9682a2 commit 808614f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/content/docs/log-explorer/manage-datasets.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@ Log Explorer currently supports the following datasets:
2020
- [Secure Web Gateway](/cloudflare-one/policies/gateway/)
2121
- [WARP](/warp-client/)
2222

23+
### Headers and cookies
24+
25+
To query request headers and cookies, you must first enable logging for these fields using [Custom fields](/logs/logpush/logpush-job/custom-fields/).
26+
27+
The example below shows how to query HTTP requests by date, timestamp, client country, and a custom request header. Be sure to log the specific headers or cookies you plan to query in advance.
28+
29+
```bash
30+
SELECT clientip, clientrequesthost, clientrequestmethod, edgeendtimestamp, edgestarttimestamp, rayid, clientcountry, requestheaders
31+
FROM http_requests
32+
WHERE Date >= '2025-07-17'
33+
AND Date <= '2025-07-17'
34+
AND edgeendtimestamp >= '2025-07-17T07:54:19Z'
35+
AND edgeendtimestamp <= '2025-07-18T07:54:19Z'
36+
AND clientcountry = 'us'
37+
AND requestheaders."x-test-header" like '%654AM%';
38+
```
39+
2340
## Enable Log Explorer
2441

2542
In order for Log Explorer to begin storing logs, you need to enable the desired datasets. You can do this via the dashboard or the API.

0 commit comments

Comments
 (0)