Web Application Firewall (WAF)
Manage WAF resources, modes, and custom rules through the Security API.
Creates a new WAF-enabled CDN Resource for the specified organization.
UUID of the organization.
dynamicoriginhttpstest.comdomain.test.comwaf-213105900wafWAF resource created successfully.
POST /api/v1/cdn/{organization_uuid}/resource HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 176
{
"resource_type": "dynamic",
"data_source": "origin",
"protocol": "https",
"origin_url": "test.com",
"server_name": "domain.test.com",
"resource_name": "waf-213105900",
"extensions": "waf"
}WAF resource created successfully.
{
"status": true,
"data": {
"resource_uuid": "****-****-****-****",
"resource_type": "dynamic",
"resource_name": "waf-213105900",
"cdn_url": "waf-213105900.mncdn.org",
"ssl_certificate": "sni",
"created_at": "2023-12-15T18:31:06Z",
"data_source": "origin",
"server_name": "domain.test.com",
"protocol": "https",
"origin_url": "test.com"
}
}Switch between detection, active, or disabled modes for the WAF.
UUID of the organization.
UUID of the WAF resource.
WAF operating mode.
wafWAF resource mode changed successfully.
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 126
{
"resource_uuid": "text",
"waf_status": "on",
"type": "waf",
"waf_global_rules": [
{
"secruleid": "text",
"status": "enabled",
"score": 1
}
]
}WAF resource mode changed successfully.
{
"status": true,
"data": {}
}Define or modify custom WAF rules, including conditions and actions.
UUID of the organization.
UUID of the WAF resource.
wafCustom WAF rule creation successful.
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid}/rules HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 186
{
"resource_uuid": "text",
"waf_status": "on",
"type": "waf",
"waf_rules": [
{
"rule_name": "text",
"conditions": [
{
"field": "user_agent",
"operator": "contain",
"value": "text"
}
],
"rule_action": "allow"
}
]
}Custom WAF rule creation successful.
{
"status": true,
"data": {}
}Removes all defined custom rules for the WAF resource.
UUID of the organization.
UUID of the WAF resource.
wafEmpty array deletes all WAF rules.
WAF rules deleted successfully.
DELETE /api/v1/cdn/{organization_uuid}/resource/{resource_uuid}/rules HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 95
{
"resource_uuid": "****-***-****-****",
"waf_status": "detectiononly",
"type": "waf",
"waf_rules": []
}WAF rules deleted successfully.
{
"status": true,
"data": {}
}Last updated
Was this helpful?