csrf#
- class starlite.middleware.csrf.CSRFMiddleware#
Bases:
MiddlewareProtocolCSRF 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
nextASGI app to call.config – The CSRFConfig instance.