Headers

The following headers are included in Now deployments and indicate certain factors of the environment:

now: 1

This header is used for identifying a response coming from the Now platform.

server: now

Similar to now: 1. This header can be overridden by other proxies (e.g., Cloudflare).

x-now-cache

This header's value indicates whether the response was served from ZEIT's edge cache.

The following values are possible when the content being served is static or uses a Cache-Control header.

Value
Description
HIT
The response was served from the edge.
MISS
The response was not found in the edge and so was fetched from an origin server.
BYPASS
The cache was bypassed and so the response was served from an origin server.
EXPIRED
The entry in the cache has expired. The response is served from an origin server.
STALE
The response from the cache is outdated but another visitor has already requested the response and the edge node is processing the revalidation.
UPDATING
The response is stale as the entry is currently being updated due to a previous request.
REVALIDATED
The response from the cache was stale but it was revalidated by checking If-Modified-Since or If-None-Match headers.

x-now-id

The unique identifier for each request.

x-now-trace

Contains a list of our data centers through which the request has traversed, usually the data center closest to you.

Note: The trace is where a request was processed, it is not necessarily where a lambda was executed, this could be different if you defined regions in yournow.json file.

Custom Headers

In addition to regular HTTP headers and Now headers, it is also possible to supply your own custom headers.

Custom headers are added in the same way regular headers are, by making an addition to the routes property in your now.json file.