Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firewall_rule: Fix the ability to delete multiple rules #578

Merged

Conversation

jacobbednarz
Copy link
Member

Updates the internals of DeleteFirewallRules to build the correct
query string parameters for deleting multiple rules in a single request.

I attempted the following without any luck:

  • ?id=abc123,def456
  • ?id[]=abc123&id[]=def456
  • DELETE /zones/:zone_id/firewall/rules with a payload of
    [{"id":"abc123"},{"id":"def456"}]

The first option was the initial version that worked however it looks like the
API has moved on to another method which we now support here.

Closes #565

Updates the internals of `DeleteFirewallRules` to build the correct
query string parameters for deleting multiple rules in a single request.

Closes cloudflare#565
@patryk patryk merged commit cca22a7 into cloudflare:master Jan 20, 2021
@patryk
Copy link
Contributor

patryk commented Jan 20, 2021

Great, thanks!

@jacobbednarz jacobbednarz deleted the fix-deletion-of-multiple-firewall-rules branch January 20, 2021 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

it is impossible to delete several FW rules at once (api.DeleteFirewallRules)
2 participants