Skip to content

Commit

Permalink
Include description with the rule update request
Browse files Browse the repository at this point in the history
The rule description has to be included with the PUT request that updates an existing rule; otherwise it will be lost.
  • Loading branch information
mrrfv committed Nov 29, 2024
1 parent 17b34b6 commit 23b0f07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ export const updateZeroTrustRule = async (id, wirefilterExpression, name = "CGPS
// Name and action are required fields, even if they haven't changed.
// And enabled must always be set to true, otherwise the rule will be disabled if omitted.
name,
description:
"Filter lists created by Cloudflare Gateway Pi-hole Scripts. Avoid editing this rule. Changing the name of this rule will break the script.",
action: "block",
enabled: true,
rule_settings: { "block_page_enabled": BLOCK_PAGE_ENABLED, "block_reason": "Blocked by CGPS, check your filter lists if this was a mistake." },
Expand Down

0 comments on commit 23b0f07

Please sign in to comment.