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

docs: add ip rate rule and compound rule docs #18

Merged
merged 2 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading