Country
Category: Location
Purpose: Identifies requests by the country from which the request was issued.
Key information:
- A country can be specified through its country code.
- Specify multiple country codes by delimiting each one with a single space.
- Wildcards are not supported when specifying a country code.
-
The "EU" and "AP" country codes do not encompass all IP addresses in those regions.
Learn more.
- Certain requests may not return a valid country code. A question mark (i.e., ?) will match requests for which a valid country code could not be determined.
- Country codes are case-sensitive.
-
The Result option determines when this condition will be met.
- Match: This condition is satisfied when the request originates from one of the specified countries.
- Does Not Match: This condition is satisfied when the request does not originate from one of the specified countries.
-
Due to the manner in which cache settings are tracked, this match condition is incompatible with the following features:
- Default Internal Max-Age
- Force Internal Max-Age
- Ignore Origin No-Cache
- Internal Max-Stale
Replicating Country Filtering Behavior
This match condition allows you to perform a multitude of customizations based on the location from which a request originated. For example, the behavior of the Country Filtering feature can be replicated through the following configuration:
-
URL Path Wildcard Match: Set the URL Path Wildcard match condition to the directory that will be secured.
Make sure to append an asterisk to the end of the relative path to ensure that access to all of its children will be restricted by this rule.
-
Country Match: Set the Country match condition to the desired set of countries.
- Allow: Set the Country match condition to "nomatch" to only allow the specified countries access to content stored in the location defined by the URL Path Wildcard match condition.
- Block: Set the Country match condition to "match" to block the specified countries from accessing content stored in the location defined by the URL Path Wildcard match condition.
- Deny Access (403) Feature: Enable the Deny Access (403) feature to replicate the allow or block portion of the Country Filtering feature.
Instead of duplicating the exact behavior of the Country Filtering feature, add other match conditions to fine-tune access control. For example, video playback may be restricted by a combination of request URL, file type, and country.
Edgecast CDN