This guide covers the headers that Layer0 injects into requests making them visible to your server code. Note that the
x-0-* headers namespace is reserved for Layer0 internal use and setting them yourself, except where so noted, is unsupported.
x-request-id: unique request ID on Layer0 which may optinally be provided by you when issuing the requests to Layer0
x-0-client-ip: the client IP address from which the request to Layer0 edge components originated; cannot be used for user agent IP identification when Layer0 is behind another CDN).
x-0-destination: the routing destination as determined by traffic splitting rules if any; the name of the destinations are taken from Layer0 router code and if not specified then default is
x-0-original-qs: contains the original query string if custom caching rules exclude query strings for the matching route; otherwise not set
x-0-protocol: the protocol on which the connection to your site has been established; it can either be
http; see more details here
User agent headers are headers that Layer0 derives by analyzing the received
user-agent request header.
x-0-device: device type which can be
mobile(feature phones) or
x-0-vendor: vendor of the device which can be
x-0-device-is-bot: flag indicating a bot device (
0for not identified as bot,
1for identified as bot)
x-0-browser: browser type which can be
These values are provided as best effort as user agent, especially adversarial ones, can control the values by which we determine the values above.
Geolocation headers contain the geographical information about the provenance of the request. They are based on the IP of the actual request or, if overriding need is presented, on the content of
x-0-client-ip request header.
x-0-geo-country-code: the ISO 3166 two letter code for the country from which the request originated. See the Alpha-2 code column in the list of ISO 3166 country codes for reference.
x-0-geo-state-code: the two letter state code from which the request originated
x-0-geo-city: the name of the city from which the request originated
x-0-geo-postal-code: the ZIP or postal code from which the request originated
x-0-geo-latitude: the geographical latitude from which the request originated
x-0-geo-longitude: the geographical longitude from which the request originated
x-0-geo-asn: the autonomous system number of the network operator from which the request originated
x-0-preload: Will be “1” if the request originated from Static Prerendering. Otherwise this header will not be present.