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 action docs #19

Merged
merged 1 commit into from
Oct 8, 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
35 changes: 35 additions & 0 deletions docs/action.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Action List
description: Learn how to configure your actions in CasWAF.
keywords: [caswaf]
authors: [casbin]
---
`Action` is related to the rules used in the site to handle requests.

This section will provide a detailed explanation of the properties and usage of `Action`.

## Action properties

- `Name`: The name of the action.
- `Type`: The type of the action. It can be set to `Allow`, `Block` and `Captcha`.
- `Status Code`: The status code of the action. It can be set to any HTTP status code.

## Manage Actions

![actions](/img/actions/actions.jpg)

In the Actions page, you will see all actions you have created. You can create, edit, delete and view the action details. But now we don't have any actions.

## Add an action

![addaction](/img/actions/addaction.jpg)

Just click the `Add` button, you will create an action. The created action will have some default information that you can modify.

## Edit action

After you create an action, you can click the `edit` button to edit the action.

![editaction](/img/actions/editaction.jpg)

Each field's meaning is as described above, and you can freely modify them according to the actual situation of your website.
11 changes: 11 additions & 0 deletions docs/allow-action.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Allow Action
description: Learn how to configure your Allow Action in CasWAF.
keywords: [caswaf]
authors: [casbin]
---
CasWAF provides a easy-to-use Allow Action feature to help you control the access of your website. You can add Allow Actions to allow specific requests to your website.

![allow-action](/img/actions/allow-action.jpg)

It is recommended to set the `Status Code` to `200` for the `Allow` action. When the rule is hitted and its action is `Allow`, CasWAF will respond with a status code of `200`.
11 changes: 11 additions & 0 deletions docs/block-action.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Block Action
description: Learn how to configure your Block Action in CasWAF.
keywords: [caswaf]
authors: [casbin]
---
CasWAF provides a easy-to-use Block Action feature to help you control the access of your website. You can add Block Actions to block specific requests to your website.

![block-action](/img/actions/block-action.jpg)

It is recommended to follow the HTTP status code standard when setting the `Status Code` for the `Block` action. When the rule is hitted and its action is `Block`, CasWAF will respond with the specified status code.
15 changes: 15 additions & 0 deletions docs/captcha-action.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Captcha Action
description: Learn how to configure your Captcha Action in CasWAF.
keywords: [caswaf]
authors: [casbin]
---
CasWAF provides a easy-to-use Captcha Action feature to help you control the access of your website. You can add Captcha Actions to require users to pass a CAPTCHA verification before accessing your website.

![captcha-action](/img/actions/captcha-action.jpg)

Before adding a Captcha Action, you need to make sure that you have added a Captcha applications in your Casdoor instance and your Casdoor version is greater than or equal to `v1.681.0`.

## Captcha Action properties

- `Immunity times`: Used in the `Captcha` type. The times that the user can access the site without captcha verification after passing the captcha verification. It should be a positive integer.
11 changes: 11 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ module.exports = {
"compound-rule",
],
},
{
type: "category",
label: "Actions",
link: {type: "generated-index"},
items: [
"action",
"allow-action",
"block-action",
"captcha-action",
],
},
// {
// type: "category",
// label: "",
Expand Down
Binary file added static/img/actions/actions.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/actions/addaction.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/actions/allow-action.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/actions/block-action.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/actions/captcha-action.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/actions/editaction.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading