Skip to content
Cloudflare Docs

http.request.headers

http.request.headers Map<Array<String>>

The HTTP request headers represented as a Map (or associative array).

The keys of the associative array are the names of HTTP request headers converted to lowercase.

When there are repeating headers, the array includes them in the order they appear in the request.

The request header values are not pre-processed and retain the original case used in the request.

  • Decoding: No decoding performed
  • Whitespace: Preserved
  • Non-ASCII: Preserved

When the HTTP request contains too many headers, this field may not contain all of the headers sent in the HTTP request. In this situation, the http.request.headers.truncated field will be set to true.

Example value:

{"content-type": ["application/json"]}

Example usage:

any(http.request.headers["content-type"][*] == "application/json")
Categories:
  • Request
  • Headers