# HG changeset patch # User Kim Alvefur # Date 1520357074 -3600 # Node ID 9fd61234b6f036bffcb629dbcc436c2636fd93db # Parent 39485b9bbdd6b8bd0cefd658b400eb9c8499a17d mod_firewall/definitions: Comments on LIST backends diff -r 39485b9bbdd6 -r 9fd61234b6f0 mod_firewall/definitions.lib.lua --- a/mod_firewall/definitions.lib.lua Fri Feb 23 20:53:28 2018 +0200 +++ b/mod_firewall/definitions.lib.lua Tue Mar 06 18:24:34 2018 +0100 @@ -62,6 +62,7 @@ end local list_backends = { + -- %LIST name: memory (limit: number) memory = { init = function (self, type, opts) if opts.limit then @@ -88,6 +89,8 @@ return self.items[item] == true; end; }; + + -- %LIST name: http://example.com/ (ttl: number, pattern: pat, hash: sha1) http = { init = function (self, url, opts) local poll_interval = assert(tonumber(opts.ttl or "3600"), "invalid ttl for <"..url.."> (expected number of seconds)"); @@ -140,6 +143,8 @@ return self.items and self.items[item] == true; end; }; + + -- %LIST: file:/path/to/file file = { init = function (self, file_spec, opts) local filename = file_spec:gsub("^file:", "");