core.middleware
Overview
ASGI middleware stack with CORS, session, auth, and Sentry user tracking.
Classes
AsgiMiddlewareStack
AllowedHostsOriginValidator isn't here since it is websocket specific, the rest can be used on both http and websocket connections.
Signature
AsgiMiddlewareStack(inner)
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| inner | yes |
Source
server/vueda/core/middleware.py:48
update_sentry_user
Set the Sentry user for the current scope from user, or clear it when user is None.
An anonymous user sends only the automatic IP address; a saved user also sends its pk and email.
Signature
update_sentry_user(user)
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| user | yes |
Source
server/vueda/core/middleware.py:17
Source
server/vueda/core/middleware.py