From 343dc0da8de0cf2f645cf8b5d76f5b439cb817f3 Mon Sep 17 00:00:00 2001 From: Rodja Trappe Date: Tue, 31 Dec 2024 10:37:28 +0100 Subject: [PATCH] clear client cookies after reach response to prevent httpx internal cookie persistence to leak from one On Air request into another --- nicegui/air.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nicegui/air.py b/nicegui/air.py index ffa8233f0..e7c249e96 100644 --- a/nicegui/air.py +++ b/nicegui/air.py @@ -59,6 +59,7 @@ async def _handle_http(data: Dict[str, Any]) -> Dict[str, Any]: content=data['body'], ) response = await self.client.send(request) + self.client.cookies.clear() instance_id = data['instance-id'] content = response.content.replace( b'const extraHeaders = {};',