Web Application Firewall (WAF)
Manage WAF resources, modes, and custom rules through the Security API.
Use the WAF endpoints to create WAF-enabled CDN Resources, change WAF operating mode, and manage custom WAF rules.
Creates a CDN Resource with Web Application Firewall (WAF) enabled.
Unique identifier of the organization.
dynamicoriginhttpstest.comdomain.test.comwaf-213105900wafReturns the created WAF-enabled CDN Resource.
truePOST /api/v1/cdn/{organization_uuid}/resource HTTP/1.1
Host: cloud.medianova.com
Authorization: Bearer YOUR_SECRET_TOKEN
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"
}Returns the created WAF-enabled CDN Resource.
{
"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"
}
}Updates the operating mode of the Web Application Firewall (WAF) for the specified Resource.
Unique identifier of the organization.
Unique identifier of the WAF-enabled CDN Resource.
WAF operating mode.
wafReturns a confirmation indicating that the WAF mode was updated.
truePUT /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: 126
{
"resource_uuid": "text",
"waf_status": "on",
"type": "waf",
"waf_global_rules": [
{
"secruleid": "text",
"status": "enabled",
"score": 1
}
]
}Returns a confirmation indicating that the WAF mode was updated.
{
"status": true,
"data": {}
}Creates or updates custom WAF rules for the specified Resource.
Unique identifier of the organization.
Unique identifier of the WAF-enabled CDN Resource.
wafReturns a confirmation indicating that the custom WAF rules were applied.
truePUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid}/rules HTTP/1.1
Host: cloud.medianova.com
Authorization: Bearer YOUR_SECRET_TOKEN
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"
}
]
}Returns a confirmation indicating that the custom WAF rules were applied.
{
"status": true,
"data": {}
}Deletes all custom WAF rules associated with the specified Resource.
Unique identifier of the organization.
Unique identifier of the WAF-enabled CDN Resource.
wafProvide an empty array to delete all custom WAF rules.
Returns a confirmation indicating that all custom WAF rules were deleted.
trueDELETE /api/v1/cdn/{organization_uuid}/resource/{resource_uuid}/rules HTTP/1.1
Host: cloud.medianova.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 95
{
"resource_uuid": "****-***-****-****",
"waf_status": "detectiononly",
"type": "waf",
"waf_rules": []
}Returns a confirmation indicating that all custom WAF rules were deleted.
{
"status": true,
"data": {}
}Last updated
Was this helpful?