User Agent ACL

Define user agent–based access control rules for CDN Resources through the Security API

Update User Agent ACL settings for a CDN Resource

put

Use this endpoint to enable or disable User Agent ACL for a CDN Resource. You can define allow or block rules based on specific user agent strings. This feature is supported for Small, Large, Dynamic (Aksela), and Streaming resource types.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
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_user_agent_aclbooleanRequired

Enables or disables User Agent ACL for the CDN Resource.

Example: true
Responses
200

User Agent ACL 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: 212

{
  "status_user_agent_acl": true,
  "user_agent_acl": {
    "type": "blacklist",
    "whitelist": [],
    "blacklist": [
      {
        "type": "contains",
        "value": "range"
      },
      {
        "type": "exact_match",
        "value": "test"
      },
      {
        "type": "contains",
        "value": "BadCrawler"
      }
    ]
  }
}
200

User Agent ACL settings updated successfully.

{
  "status": true,
  "data": {}
}

Last updated

Was this helpful?