Skip to content

Commit

Permalink
docs(README): add custom response usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dwisiswant0 committed Aug 5, 2023
1 parent b1b767b commit 176fc26
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ excludes: []
whitelists: []
customs: []
customs_from_file: ""
response:
status: 0
html: ""
html_file: ""
log_file: ""
no_stderr: false
no_update_check: false
Expand All @@ -150,10 +154,15 @@ Or the equivalent in JSON format:
```json
{
"excludes": null,
"whitelists": null,
"customs": null,
"excludes": [],
"whitelists": [],
"customs": [],
"customs_from_file": "",
"response": {
"status": 0,
"html": "",
"html_file": ""
},
"log_file": "",
"no_stderr": false,
"no_update_check": false,
Expand Down Expand Up @@ -185,6 +194,10 @@ Customs from file (**customs_from_file**) specifies the file path or glob patter

The glob pattern supports wildcards, allowing you to specify multiple files or a directory with matching files. For example, "/path/to/custom/rules/\**/*.yaml" will load all YAML files in the "rules" directory and its subdirectories. Please refer to the [docs](https://github.com/kitabisa/teler-waf#custom-rules).

### Custom Response

Response (**response**) is the configuration for custom error response pages when a request is blocked or rejected. Please refer to the [docs](https://github.com/kitabisa/teler-waf#custom-response).

### Log File

Log file (**log_file**) is the file path (`string`) for the log file to store the security logs. If `log_file` is specified, log messages will be written to the specified file in addition to stderr (if `no_stderr` is **false**).
Expand Down

0 comments on commit 176fc26

Please sign in to comment.