Subjects¶
-
class
uwsgiconf.options.routing_subjects.
SubjectCustom
(subject, *, negate=False)¶ Represents a routing subject that supports various check.
Parameters: - subject (Var|str) – Handwritten subject or a Var heir representing it.
- negate (bool) – Use to negate subject for rule. .. note:: You can also use tilde (~) instead of this argument for nagation.
-
exists
()¶ Check if the subject exists in the filesystem.
-
isfile
()¶ Check if the subject is a file.
-
isdir
()¶ Check if the subject is a directory.
-
islink
()¶ Check if the subject is a link.
-
isexec
()¶ Check if the subject is an executable file.
-
islord
()¶ Check if the subject is a Legion Lord.
-
contains_ipv4
()¶ Check if the subject is ip v4.
-
contains_ipv6
()¶ Check if the subject is ip v6.
-
eq
(val)¶ Check if the subject is equal to the specified pattern.
-
ge
(val)¶ Check if the subject is greater than or equal to the specified pattern.
-
le
(val)¶ Check if the subject is less than or equal to the specified pattern.
-
gt
(val)¶ Check if the subject is greater than the specified pattern.
-
lt
(val)¶ Check if the subject is less than the specified pattern.
-
startswith
(val)¶ Check if the subject starts with the specified pattern.
-
endswith
(val)¶ Check if the subject ends with the specified pattern.
-
matches
(regexp)¶ Check if the subject matches the specified regexp.
-
isempty
()¶ Check if the subject is empty.
-
contains
(val)¶ Check if the subject contains the specified pattern.
-
class
uwsgiconf.options.routing_subjects.
SubjectPathInfo
(regexp)¶ Default subject, maps to PATH_INFO.
-
class
uwsgiconf.options.routing_subjects.
SubjectRequestUri
(regexp)¶ Checks REQUEST_URI for a value.
-
class
uwsgiconf.options.routing_subjects.
SubjectQueryString
(regexp)¶ Checks QUERY_STRING for a value.
-
class
uwsgiconf.options.routing_subjects.
SubjectRemoteAddr
(regexp)¶ Checks REMOTE_ADDR for a value.
-
class
uwsgiconf.options.routing_subjects.
SubjectRemoteUser
(regexp)¶ Checks REMOTE_USER for a value.
-
class
uwsgiconf.options.routing_subjects.
SubjectHttpHost
(regexp)¶ Checks HTTP_HOST for a value.
-
class
uwsgiconf.options.routing_subjects.
SubjectHttpReferer
(regexp)¶ Checks HTTP_REFERER for a value.
-
class
uwsgiconf.options.routing_subjects.
SubjectHttpUserAgent
(regexp)¶ Checks HTTP_USER_AGENT for a value.
-
class
uwsgiconf.options.routing_subjects.
SubjectStatus
(regexp)¶ Checks HTTP response status code.
Warning
Not available in the request chain.