I use the REST API : https://github.com/cloudflare/cloudflare-php
I try to update a firewall and add a new IP to an existing rule:
$expression = “(ip.src eq 100.100.100.100)”;
$firewall->updateFirewallRule($zoneid, $rule->id, $rule->filter->id, $expression , $options, ‘customNewRule’);
It does not work: the expression is not set to 100.100.100.100.
However the name of the rule is correctly changed to customNewRule, which means parameters and call is correct except the $newExpression.
When I manually paste that expression in my config panel, it is changed which means expression syntax is correct.
Do I need to encode $expression in base64 ? or some special encoding ?
I successfully did it with CURL -which is very unreadable - and I try to use the php rest API provided.
Any suggestion, ideas ?