Available in all subroutines.
Two-letter code representing the continent. Possible codes are:
These continents are defined by UN M.49.
The continent code for the Caribbean countries is
EU refers to the continent name, not to the European Union. For
example, IP addresses allocated to Norway and Switzerland (members of the
European Economic Area and the Schengen Area respectively, but not of the
European Union) are presented with the continent code
EU, meaning the
geographic continent of Europe.
client.geo.continent_code is used in the following code examples. Examples apply VCL to real-world use cases and can be deployed as they are, or adapted for your own service. See the full list of code examples for more inspiration.
Click RUN on a sample below to provision a Fastly service, execute the code on Fastly, and see how the function behaves.
Decorating origin requests with GeoIP
Add GeoIP data about the client browser as extra headers in any requests from Fastly to your origin.
Geofencing / geoblocking content by region
Group countries to cache content by custom regions or reject requests from some regions entirely.