Khaleel Al-Adhami 1 tydzień temu
rodzic
commit
309444bca2
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7 0
      reflex/app.py

+ 7 - 0
reflex/app.py

@@ -663,6 +663,13 @@ class App(MiddlewareMixin, LifespanMixin):
                 self.app = app
 
             async def __call__(self, scope: Scope, receive: Receive, send: Send):
+                if scope["type"] != "http":
+                    return await self.app(scope, receive, send)
+
+                print(  # noqa: T201
+                    f"Called scope: {scope}"
+                )
+
                 async def log_receive():
                     message = await receive()
                     print(  # noqa: T201