resp.is_locally_generated
BOOL, read-only.
Whether request handling went through vcl_error
.
Request handling will go through vcl_error
and a response will be generated
locally when the VCL executes the error
action or when Varnish encounters a
problem while handling the request, such as a communication failure with the
backend. This VCL variable allows you to distinguish locally generated error
responses from error responses received from upstream (from the origin or
from a shield pop).
All synthetic responses are generated in vcl_error
, not only error responses.
If you use vcl_error
to generate synthetic responses in non-error cases,
you might need to check resp.status
in combination with
resp.is_locally_generated
to determine that a response is a locally
generated error response.