Geoblocking

Restrict or allow content delivery by region through the Security API.

Update Geoblocking settings for a CDN Resource

put

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_uuidstringRequired

Unique identifier of the organization.

Example: 123e4567-e89b-12d3-a456-426614174000
resource_uuidstringRequired

Unique identifier of the CDN Resource.

Example: 789e1234-b56c-78d9-a123-526614174111
Body
status_geo_blockingbooleanRequired

Enables or disables Geoblocking for the CDN Resource.

Example: true
resource_uuidstringRequired

Unique identifier of the CDN Resource.

Example: 789e1234-b56c-78d9-a123-526614174111
default_rule_geo_blocking_statusbooleanRequired

Defines whether the default Geoblocking rule is active.

Example: true
Responses
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?