Software /
code /
prosody-modules
Comparison
mod_firewall/README.markdown @ 2110:c26b28c65d47
mod_firewall: README: Document INSPECT's pattern matching ability
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 17 Mar 2016 11:39:43 +0000 |
parent | 2108:573fe9825fba |
child | 2111:4e434abaf8fc |
comparison
equal
deleted
inserted
replaced
2109:9db4113d0cb5 | 2110:c26b28c65d47 |
---|---|
146 segments by '/'. Each segment describes an element by its name, | 146 segments by '/'. Each segment describes an element by its name, |
147 optionally prefixed by its namespace in curly braces ('{...}'). If the | 147 optionally prefixed by its namespace in curly braces ('{...}'). If the |
148 path ends with a '\#' then the text content of the last element will be | 148 path ends with a '\#' then the text content of the last element will be |
149 returned. If the path ends with '@name' then the value of the attribute | 149 returned. If the path ends with '@name' then the value of the attribute |
150 'name' will be returned. | 150 'name' will be returned. |
151 | |
152 You can use INSPECT to test for the existence of an element or attribute, | |
153 or you can see if it is equal to a string by appending `=STRING` (as in the | |
154 example above). Finally,you can also test whether it matches a given Lua | |
155 pattern by using `~=PATTERN`. | |
151 | 156 |
152 INSPECT is somewhat slower than the other stanza matching conditions. To | 157 INSPECT is somewhat slower than the other stanza matching conditions. To |
153 minimise performance impact, always place it below other faster | 158 minimise performance impact, always place it below other faster |
154 condition checks where possible (e.g. above we first checked KIND, TYPE | 159 condition checks where possible (e.g. above we first checked KIND, TYPE |
155 and PAYLOAD matched before INSPECT). | 160 and PAYLOAD matched before INSPECT). |