From 176fc263873cc3e2c0b70c8f22b1b4286d223a85 Mon Sep 17 00:00:00 2001 From: Dwi Siswanto Date: Sat, 5 Aug 2023 14:39:43 +0700 Subject: [PATCH] docs(README): add custom response usage --- README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2e7e75b..ad43343 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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, @@ -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**).