You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.
I know you're not maintaining this since the official Cloudflare API is available now, but we still use your project so I thought I'd report this.
Recently we're starting to see 404 errors from the Zone\Firewall]\AccessRules class.
The returned output looks like this:
{ "code": 1000, "error": "not_found" }
It turns out the problem has to do with the request URL. All request URLs have a double // in them, which doesn't affect any of the API queries except for the zones one it seems.
Eg this works fine:
GET https://api.cloudflare.com/client/v4//user/firewall/access_rules/rules
But this will be a 404:
GET https://api.cloudflare.com/client/v4//zones/:zoneid/firewall/access_rules/rules
The reason why there are doubled // in the URL path is that all the requests look like this in the code:
I know you're not maintaining this since the official Cloudflare API is available now, but we still use your project so I thought I'd report this.
Recently we're starting to see 404 errors from the Zone\Firewall]\AccessRules class.
The returned output looks like this:
{ "code": 1000, "error": "not_found" }
It turns out the problem has to do with the request URL. All request URLs have a double // in them, which doesn't affect any of the API queries except for the zones one it seems.
Eg this works fine:
GET https://api.cloudflare.com/client/v4//user/firewall/access_rules/rules
But this will be a 404:
GET https://api.cloudflare.com/client/v4//zones/:zoneid/firewall/access_rules/rules
The reason why there are doubled // in the URL path is that all the requests look like this in the code:
return $this->get('/zones/'.$zone_id.'/firewall/access_rules/rules', $data);
But in the get request function it does this:
$url = 'https://api.cloudflare.com/client/v4/'.$path;
The fix is to to remove the extra / in the call to get, eg:
return $this->get('zones/'.$zone_id.'/firewall/access_rules/rules', $data);
Or more universally it's possible to remove the trailing / in the request function.
The text was updated successfully, but these errors were encountered: