Geoblocking
Restrict or allow content delivery by region through the Security API.
Use this endpoint to configure Geoblocking for a CDN Resource. You can define allowed or restricted countries and IP addresses. This setting is supported for all CDN Resource types.
Authorizations
Path parameters
organization_uuidstringRequiredExample:
Unique identifier of the organization.
123e4567-e89b-12d3-a456-426614174000resource_uuidstringRequiredExample:
Unique identifier of the CDN Resource.
789e1234-b56c-78d9-a123-526614174111Body
status_geo_blockingbooleanRequiredExample:
Enables or disables Geoblocking for the CDN Resource.
trueresource_uuidstringRequiredExample:
Unique identifier of the CDN Resource.
789e1234-b56c-78d9-a123-526614174111default_rule_geo_blocking_statusbooleanRequiredExample:
Defines whether the default Geoblocking rule is active.
trueResponses
200
Geoblocking settings updated successfully.
application/json
put
/api/v1/cdn/{organization_uuid}/resource/{resource_uuid}PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 301
{
"status_geo_blocking": true,
"resource_uuid": "789e1234-b56c-78d9-a123-526614174111",
"default_rule_geo_blocking_status": true,
"geo_blocking_details": {
"pull_from_origin_header": false,
"type": "disallow",
"whitelist_countries": [
"AR"
],
"blacklist_countries": [
""
],
"whitelist_ip": [
"1.2.3.4"
],
"blacklist_ip": [
""
]
}
}200
Geoblocking settings updated successfully.
{
"status": true,
"data": {}
}Last updated
Was this helpful?