-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add ip rate rule and compound rule docs (#18)
* docs: add ip rate rule and compound rule docs * fix: space in code
- Loading branch information
Showing
5 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,8 @@ module.exports = { | |
"ip-rule", | ||
"ua-rule", | ||
"waf-rule", | ||
"ip-rate-rule", | ||
"compound-rule", | ||
], | ||
}, | ||
// { | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.