ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

module documentation

Web-layer middleware that enforces Cross-Site Request Forgery protection.

Class CSRFTokenMiddleware Web-layer middleware that enforces Cross-Site Request Forgery protection.
Constant _FIELD_CSRF Form field names inspected for the submitted value, in priority order.
Constant _FIELD_CSRF_ALT csrf_token.
Constant _FORM_MIME_MULTIPART multipart/form-data.
Constant _FORM_MIME_URLENCODED Content-Types that may carry the CSRF value inside the request body.
Constant _HDR_CSRF Request header names inspected for the submitted value (lowercase).
Constant _HDR_XSRF x-xsrf-token.
Constant _SAFE_METHODS CSRF check is skipped entirely.
_FIELD_CSRF: str = (source)

Form field names inspected for the submitted value, in priority order.

Value
'_csrf'
_FIELD_CSRF_ALT: str = (source)

csrf_token.

Value
'csrf_token'
_FORM_MIME_MULTIPART: str = (source)

multipart/form-data.

Value
'multipart/form-data'
_FORM_MIME_URLENCODED: str = (source)

Content-Types that may carry the CSRF value inside the request body.

Value
'application/x-www-form-urlencoded'
_HDR_CSRF: str = (source)

Request header names inspected for the submitted value (lowercase).

Value
'x-csrf-token'
_HDR_XSRF: str = (source)

x-xsrf-token.

Value
'x-xsrf-token'
_SAFE_METHODS: frozenset[str] = (source)

CSRF check is skipped entirely.

Value
frozenset(set(['GET', 'HEAD', 'OPTIONS', 'TRACE']))