Skip to content

Commit

Permalink
docs: add ip rate rule and compound rule docs
Browse files Browse the repository at this point in the history
  • Loading branch information
love98ooo committed Oct 5, 2024
1 parent d0cebe4 commit 07fb4f8
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/compound-rule.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Compound Rule
description: Learn how to config Compound rules in CasWAF.
keywords: [caswaf]
authors: [casbin]
---
CasWAF provides a Compound rule feature to help you control the access of your website. With Compound rules, you can combine multiple rules with logical operators to create complex access control policies.

![compound-rule](/img/rules/compound-rule.jpg)

## Compound Expression properties

- `Logic`: The logical operator of the compound rule. It can be set to `and` or `or`, and the first rule in the compound rule will be ignored if the logical operator is `begin`. During expression evaluation, `and` has a higher priority than `or`. For example, `A and B or C` is equivalent to `(A and B) or C`.
- `Rule`: The rules that need to be combined.
15 changes: 15 additions & 0 deletions docs/ip-rate-rule.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: IP Rate Rule
description: Learn how to config IP Rate rules in CasWAF.
keywords: [caswaf]
authors: [casbin]
---
CasWAF provides a powerful IP Rate rule feature to help you control the access of your website. You can add IP Rate rules to limit the access rate to your website based on IP addresses.

![ip-rate-rule](/img/rules/ip-rate-rule.jpg)

## IP Rate Expression properties

- `Name`: The name of the expression. It is used to identify the rule and have no effect on the rule itself.
- `Rate`: The max request rate for a single IP address. It should be a positive integer.
- ` Block Duration`: The duration of blocking the IP address when the rate limit is exceeded. It should be a positive integer in seconds.
2 changes: 2 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ module.exports = {
"ip-rule",
"ua-rule",
"waf-rule",
"ip-rate-rule",
"compound-rule",
],
},
// {
Expand Down
Binary file added static/img/rules/compound-rule.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/rules/ip-rate-rule.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 07fb4f8

Please sign in to comment.