Web Application Firewall (WAF)
Creates a new WAF resource for the specified organization.
UUID of the organization
dynamic
origin
https
test.com
domain.test.com
waf-213105900
waf
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",
"resource_label": null,
"ssl_certificate": "sni",
"created_at": "2023-12-15T18:31:06.000000Z",
"data_source": "origin",
"server_name": "domain.test.com",
"protocol": "https",
"origin_url": "test.com",
"gzip_text": false,
"gzip_image": false,
"brotli": false,
"image_optimization": false,
"webp": true,
"avif": null,
"http2": true,
"status_qs": false,
"status_secure_token": false
}
}
The UUID of the organization
The UUID of the resource
The UUID of the resource
The status of the WAF (on, detectiononly, off)
The type of resource (should be 'waf')
waf
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 change successful
{
"status": true,
"data": {}
}
The UUID of the organization
The UUID of the resource
The UUID of the resource
The status of the WAF (on, detectiononly, off)
The type of resource (should be 'waf')
waf
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 606
{
"resource_uuid": "***-****-*****-****",
"waf_status": "detectiononly",
"type": "waf",
"waf_rules": [
{
"rule_name": "rule1",
"conditions": [
{
"field": "user_agent",
"operator": "contain",
"value": "test"
}
],
"rule_action": "block"
},
{
"rule_name": "rule2",
"conditions": [
{
"field": "request_protocol",
"operator": "not_contain",
"value": "test"
}
],
"rule_action": "block"
},
{
"rule_name": "rule6",
"conditions": [
{
"field": "client_ip",
"operator": "match",
"value": [
"1.1.1.1",
"2.2.2.2"
]
}
],
"rule_action": "allow"
},
{
"rule_name": "rule7",
"conditions": [
{
"field": "request_method",
"operator": "within",
"value": [
"GET",
"POST",
"PUT"
]
}
],
"rule_action": "allow"
}
]
}
Custom WAF rule creation successful
{
"status": true,
"data": {}
}
The UUID of the organization
The UUID of the resource
The UUID of the resource
The status of the WAF (on, detectiononly, off)
The type of resource (should be 'waf')
waf
An empty array to indicate all rules should be deleted
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} 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 deletion successful
{
"status": true,
"data": {}
}
Last updated
Was this helpful?