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.
Try it out
client.geo.continent_code is used in the following solution recipes, which show real world use cases. Click RUN 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.
User contributed notes
We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.