Open jeanlst opened 5 months ago
I don't follow, could you please elaborate a little?
Sorry, I guess it does work out of the box! https://docs.litestar.dev/latest/migration/fastapi.html#middleware It's just the type hinting that's not working
I think it goes along with this question https://github.com/snok/asgi-correlation-id/discussions/16
Currently the project is 99% asgi middleware in the sense it has a Starlette dependency for the headers iirc, and the types used come also from there.
If I get it correctly, removing that dependency would make it 100% compatible with all asgi frameworks, be it Litestar or Blacksheep or all the other amazing ones I don't know about :)
A PR is welcome 👍
Hello,
Great lib! I have been using it for a while with FastAPI but I have changed to using Litestar now. It apparently works out of the box but would you be able to add official support to it?
Litestar expects this type:
Middleware: TypeAlias = "Union[Callable[..., ASGIApp], DefineMiddleware, Iterator[Tuple[ASGIApp, Dict[str, Any]]], Type[MiddlewareProtocol]]"
meanwhile I'm passing'Type[CorrelationIdMiddleware]'
Thank you!