Skip to content

Subjects

Classes

SubjectCustom

SubjectCustom(subject: Var | str, negate: bool = False)

ParametrizedValue

Represents a routing subject that supports various check.


alias

.alias: str = ''

Alias to address this value.


name

.name: str = ''

Name to represent the group.


name_separator

.name_separator: str = ':'

Separator to add after name portion.


name_separator_strip

.name_separator_strip: bool = False

Strip leading and trailing name separator from the result.


opt_key

.opt_key: str | None = None

Allows swapping default option key with custom value.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


contains

.contains(val)

Check if the subject contains the specified pattern.


contains_ipv4

.contains_ipv4()

Check if the subject is ip v4.


contains_ipv6

.contains_ipv6()

Check if the subject is ip v6.


endswith

.endswith(val)

Check if the subject ends with the specified pattern.


eq

.eq(val)

Check if the subject is equal to the specified pattern.


exists

.exists()

Check if the subject exists in the filesystem.


ge

.ge(val)

Check if the subject is greater than or equal to the specified pattern.


gt

.gt(val)

Check if the subject is greater than the specified pattern.


isdir

.isdir()

Check if the subject is a directory.


isempty

.isempty()

Check if the subject is empty.


isexec

.isexec()

Check if the subject is an executable file.


isfile

.isfile()

Check if the subject is a file.


.islink()

Check if the subject is a link.


islord

.islord()

Check if the subject is a Legion Lord.


le

.le(val)

Check if the subject is less than or equal to the specified pattern.


lt

.lt(val)

Check if the subject is less than the specified pattern.


matches

.matches(regexp)

Check if the subject matches the specified regexp.


startswith

.startswith(val)

Check if the subject starts with the specified pattern.


SubjectHttpHost

SubjectHttpHost(regexp)

SubjectBuiltin

Checks HTTP_HOST for a value.


SubjectHttpReferer

SubjectHttpReferer(regexp)

SubjectBuiltin

Checks HTTP_REFERER for a value.


SubjectHttpUserAgent

SubjectHttpUserAgent(regexp)

SubjectBuiltin

Checks HTTP_USER_AGENT for a value.


SubjectPathInfo

SubjectPathInfo(regexp)

SubjectBuiltin

Default subject, maps to PATH_INFO.


SubjectQueryString

SubjectQueryString(regexp)

SubjectBuiltin

Checks QUERY_STRING for a value.


SubjectRemoteAddr

SubjectRemoteAddr(regexp)

SubjectBuiltin

Checks REMOTE_ADDR for a value.


SubjectRemoteUser

SubjectRemoteUser(regexp)

SubjectBuiltin

Checks REMOTE_USER for a value.


SubjectRequestUri

SubjectRequestUri(regexp)

SubjectBuiltin

Checks REQUEST_URI for a value.


SubjectStatus

SubjectStatus(regexp)

SubjectBuiltin

Checks HTTP response status code.

Warning

Not available in the request chain.