Request accessor is a syntactical construct of the form:
%[name]
where name denotes a part of the incoming request or configuration setting to access and square brackets are part of the construct. Accessors are interpreted and replaced with the value of the corresponding part of the request. Some accessors take an argument, which is specified after accessor name and is delimited from it by one or more whitespace characters.
The following accessors are defined:
Configuration constant name (see Providing constants for Lua code). Optional encode defines the encoding in which to represent it. Its possible values are:
noneDon’t encode it. This is the default if no encode argument is present.
urlEncode the value using percent-encoding (RFC 3986).
base64Encode the value using base64 encoding (RFC 3548).
Request URL.
Request path.
Query part.
The value of the query parameter name.
The value of HTTP header name.
Hostname part of the Host header. If the latter
does not include port number, it is equivalent to
%[header host].
If the value of the Host header includes port number,
‘%[port]’ expands to port number with the leading colon
character. Otherwise, it expands to empty string.
Expands to the request originator IP address. If fwd is 0,
expands to its real IP, otherwise expands to the IP determined from
the X-Forwarded-For (or similar) header. See %a, for details.
If the request bears the Authorization: Basic header, expands
to the user name extracted from its value. Otherwise, its expansion is
empty.