curl --request POST \
--url https://api.tenbyte.io/v1/cdn/distributions/{distributionID}/access-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "block country",
"match_type": "regex",
"match_pattern": "/(login|offer)",
"config": {
"ip_access": {
"enabled": true,
"values": [
"113.11.48.0/20"
],
"action": "deny"
}
},
"referrer_access": {
"action": "",
"enabled": true
}
}
'