req.backend.is_shield

BOOL, read-only.

Available inall subroutines.

Indicates whether the backend currently assigned to the request is a Fastly Shield POP.

Shielding directs traffic from the Fastly POPs closest to the end user to the Fastly POP closest to your origin server, before they are finally forwarded onward to your servers. It is therefore possible for a resource to be fetched from a backend that is another Fastly POP. When this is the case, req.backend.is_shield will be true and req.backend.is_origin will be false.

Conversely, if a request is being forwarded from Fastly to a server outside of the Fastly network, req.backend.is_shield will be false and req.backend.is_origin will be true.

WARNING: The value of this variable depends on a backend having already been assigned to req.backend. VCL snippets run before the default backend assignment, so in vcl_recv this variable is only effective if you are using custom VCL and your custom VCL code is inserted after the #FASTLY recv macro. In subroutines other than vcl_recv, snippets can be used, and in general, the best place to interact with this variable is in vcl_miss and vcl_pass.