From cb02f52a465d55d1f7cedae07064e29f0923cefc Mon Sep 17 00:00:00 2001 From: Gianni Carafa Date: Sun, 5 Nov 2023 00:29:00 +0100 Subject: [PATCH] add ruleset example --- README.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08d3588..c4c1364 100644 --- a/README.md +++ b/README.md @@ -92,4 +92,32 @@ http://localhost:8080/raw/https://www.example.com It is possible to apply custom rules to modify the response. This can be used to remove unwanted or modify elements from the page. The ruleset is a YAML file that contains a list of rules for each domain and is loaded on startup -See in [ruleset.yaml](ruleset.yaml) for an example. \ No newline at end of file +See in [ruleset.yaml](ruleset.yaml) for an example. + +```yaml +- domain: www.example.com + regexRules: + - match: ]*\s+)?src="(/)([^"]*)" + replace: +- domain: www.anotherdomain.com # Domain where the rule applies + path: /article # Path where the rule applies + googleCache: false # Search also in Google Cache + regexRules: # Regex rules to apply + - match: ]*\s+)?src="(/)([^"]*)" + replace: