From b5f2b1a76d2d756ea274b4df7e74832c2a9b94a9 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Wed, 25 Aug 2021 23:04:48 +0800 Subject: [PATCH] :bug: fix fastapi driver ws missing header --- nonebot/drivers/fastapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nonebot/drivers/fastapi.py b/nonebot/drivers/fastapi.py index 62c0cef1..aacc24aa 100644 --- a/nonebot/drivers/fastapi.py +++ b/nonebot/drivers/fastapi.py @@ -439,7 +439,7 @@ class Driver(ReverseDriver, ForwardDriver): f"Bot {setup_.self_id} from adapter {setup_.adapter} connecting to {url}" ) try: - connection = Connect(setup_.url) + connection = Connect(setup_.url, extra_headers=headers) async with connection as ws: logger.opt(colors=True).info( f"WebSocket Connection to {escape_tag(setup_.adapter.upper())} "