summaryrefslogtreecommitdiff
path: root/lib/LintConfig.hs
diff options
context:
space:
mode:
authorstuebinm2021-11-19 01:29:28 +0100
committerstuebinm2021-11-19 01:29:28 +0100
commit321f4d5fa118515dcde522e1ad01ddd65741828b (patch)
treeaefb3ff2cb96d91059cbf3c16f6f7c81da145a5e /lib/LintConfig.hs
parent12025514261f524d7a4ded461709a7d151cc1b36 (diff)
add domain allow- and blocklists for weblinks
(these use a rather crude regex for parsing, which may be possible to side-step, and which should probably be replaced by something that was actually written while following the relevant rfc)
Diffstat (limited to 'lib/LintConfig.hs')
-rw-r--r--lib/LintConfig.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/LintConfig.hs b/lib/LintConfig.hs
index d237356..d976352 100644
--- a/lib/LintConfig.hs
+++ b/lib/LintConfig.hs
@@ -41,6 +41,11 @@ data LintConfig f = LintConfig
, configAllowScripts :: HKD f Bool
-- ^ Allow defining custom scripts in maps
, configLinkPrefix :: HKD f Text
+ -- ^ prefix that will be added to all outgoing weblinks
+ , configAllowedDomains :: HKD f [Text]
+ -- ^ domains that are allowed in weblinks and will not be modified
+ , configBlockedDomains :: HKD f [Text]
+ -- ^ domains that are blocked; weblinks to these is an error
} deriving (Generic)
type LintConfig' = LintConfig Identity