Skip to content

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 ​

NameTypeRequiredDefaultDescription
inneryes

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 ​

NameTypeRequiredDefaultDescription
useryes

Source ​

server/vueda/core/middleware.py:17

Source ​

server/vueda/core/middleware.py