From 5442da81b9c85497350aaefbf80ece25bc227011 Mon Sep 17 00:00:00 2001 From: Gianni Carafa Date: Wed, 8 Nov 2023 23:36:06 +0100 Subject: [PATCH] allow domain list in rules --- README.md | 5 ++++- handlers/proxy.go | 14 +++++++++----- ruleset.yaml | 26 +++++++++++++++++++++++--- 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c2a63c7..25cea80 100644 --- a/README.md +++ b/README.md @@ -121,12 +121,15 @@ See in [ruleset.yaml](ruleset.yaml) for an example. ```yaml - domain: www.example.com + domains: # Additional domains to apply the rule + - www.example.com + - www.beispiel.de regexRules: - match: ]*\s+)?src="(/)([^"]*)" replace: -- domain: www.architecturaldigest.com|www.bonappetit.com|www.cntraveler.com|www.epicurious.com|www.gq.com|www.newyorker.com|www.vanityfair.com|www.vogue.com|www.wired.com +- domains: + - www.architecturaldigest.com + - www.bonappetit.com + - www.cntraveler.com + - www.epicurious.com + - www.gq.com + - www.newyorker.com + - www.vanityfair.com + - www.vogue.com + - www.wired.com injections: - position: head append: | @@ -63,7 +74,9 @@ banners.forEach(el => { el.remove(); }); }); -- domain: www.nytimes.com|www.time.com +- domains: + - www.nytimes.com + - www.time.com injections: - position: head append: | @@ -74,7 +87,14 @@ banners.forEach(el => { el.remove(); }); }); -- domain: www.thestar.com|www.niagarafallsreview.ca|www.stcatharinesstandard.ca|www.thepeterboroughexaminer.com|www.therecord.com|www.thespec.com|www.wellandtribune.ca +- domains: + - www.thestar.com + - www.niagarafallsreview.ca + - www.stcatharinesstandard.ca + - www.thepeterboroughexaminer.com + - www.therecord.com + - www.thespec.com + - www.wellandtribune.ca injections: - position: head append: |