Lumen help

Lumen expression language

Functions and variables

Operators and keywords

                req.uri.path *= '*.html'

            

To match on a path prefix (“/my/prefix” in this example):

                req.uri.path *= '/my/prefix/*'
            

To match on single path component, “mypath”, anywhere in the path:

                req.uri.path *= '*/mypath/*'
            

Glob matching works with any variable on the left hand side of the rule, not just req.uri.path. For example, to match “MSIE” anywhere in the User-Agent field of a request:

                req.h.user-agent *= '*MSIE*'
            
                req.uri.path ~= r'\.{jpeg|jpg|gif}$'
            
                / regex / replacement / flags
            
                req.h.host == list(note.aliaslist)

req.h.host == [ 'alias1', 'alias2', 'alias3' ]

            

Types and promotion rules

The expression language features the following types, in ranked order, from highest to lowest:

Constants

Constant values of the supported types are specified as follows:

Variables

Lua bindings

Examples

Additional notes