csrf#
- class starlite.middleware.csrf.CSRFMiddleware#
Bases:
MiddlewareProtocol
CSRF Middleware class.
This Middleware protects against attacks by setting a CSRF cookie with a token and verifying it in request headers.
- __init__(app: ASGIApp, config: CSRFConfig) None #
Initialize
CSRFMiddleware
.- Parameters:
app – The
next
ASGI app to call.config – The CSRFConfig instance.