| 1 |
from litestar.middleware import ASGIMiddleware |
| 2 |
from litestar.types import ASGIApp, Receive, Scope, Send |
| 3 |
|
| 4 |
|
| 5 |
class MyMiddleware(ASGIMiddleware): |
| 6 |
async def handle(self, scope: Scope, receive: Receive, send: Send, next_app: ASGIApp) -> None: |
| 7 |
# do stuff |
| 8 |
await next_app(scope, receive, send) |