{{ header_tags }}

{{ request.headers }}

The headers object is available on every page, and contains information regarding the headers sent with the request that may be useful for serving and rendering the page.

Properties

Specific headers may be accessed using {{ request.headers.headername }} or {{ request.headers['header-name'] }}.

You may also treat this object as a list containing all of the header names which may be iterated using a {% for %} loop. For more details, see the examples below:

Field Type Description
object_type string Will always be "headers".
is_valid true/false Will always be true.
keys List A list of all of the individual header names sent with the request
count number The number of headers sent with the request. This is probably not very interesting but there you go...

Examples

Request Headers Origin

Copy
{{ request.headers.origin }}