Skip to content

Commit

Permalink
✨ Feature: 添加 websockets 驱动器 proxy 连接警告 (#2916)
Browse files Browse the repository at this point in the history
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
  • Loading branch information
shoucandanghehe and yanyongyu authored Aug 22, 2024
1 parent 6c1d7ad commit cce13f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nonebot/drivers/websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def type(self) -> str:
@override
@asynccontextmanager
async def websocket(self, setup: Request) -> AsyncGenerator["WebSocket", None]:
if setup.proxy is not None:
logger.warning("proxy is not supported by websockets driver")
connection = Connect(
str(setup.url),
extra_headers={**setup.headers, **setup.cookies.as_header(setup)},
Expand Down

0 comments on commit cce13f6

Please sign in to comment.